To use the eachQuarterOfInterval
function from the date-fns library in Typescript, you can follow these steps:
21 chars2 lines
or
18 chars2 lines
eachQuarterOfInterval
function from the date-fns
module:index.ts50 chars2 lines
eachQuarterOfInterval
function to get an array of quarters in a given interval:index.ts181 chars5 lines
The eachQuarterOfInterval
function returns an array of Date
objects, each representing the start of a quarter in the given interval.
Note: The eachQuarterOfInterval
function requires an object with start
and end
properties as its argument, instead of two separate date arguments like other date-fns functions.
gistlibby LogSnag