MCPcopy
hub / github.com/date-fns/date-fns / normalizeInterval

Function normalizeInterval

pkgs/core/src/_lib/normalizeInterval/index.ts:4–10  ·  view source on GitHub ↗
(
  context: ContextFn<Date> | undefined,
  interval: Interval,
)

Source from the content-addressed store, hash-verified

2import { normalizeDates } from "../normalizeDates/index.ts";
3
4export function normalizeInterval(
5 context: ContextFn<Date> | undefined,
6 interval: Interval,
7): NormalizedInterval<Date> {
8 const [start, end] = normalizeDates(context, interval.start, interval.end);
9 return { start, end };
10}

Callers 9

eachDayOfIntervalFunction · 0.90
eachHourOfIntervalFunction · 0.90
eachMonthOfIntervalFunction · 0.90
intervalToDurationFunction · 0.90
eachQuarterOfIntervalFunction · 0.90
eachYearOfIntervalFunction · 0.90
eachWeekOfIntervalFunction · 0.90
eachMinuteOfIntervalFunction · 0.90
eachWeekendOfIntervalFunction · 0.90

Calls 1

normalizeDatesFunction · 0.90

Tested by

no test coverage detected