Skip to content

dateInterval

The calendar interval a set of dates steps by, which formatDate labels them at: the coarsest of "year", "quarter", "month", "day", or "hour" that every step between consecutive dates is a whole multiple of, else undefined for finer steps.

Parameters

import {dateInterval} from "@d3plus/format";
dataArrayrequiredArray.<Date>

The full array of ordered Date Objects.

optionsObjectDefault {}

utc: true reads the dates in UTC.