How to use the subQuarters function from date-fns

Find comprehensive JavaScript date-fns.subQuarters code examples handpicked from public code repositorys.

174
175
176
177
178
179
180
181
182
exports.subHoursImpl = dateFns.subHours
exports.subISOYearsImpl = dateFns.subISOYears
exports.subMillisecondsImpl = dateFns.subMilliseconds
exports.subMinutesImpl = dateFns.subMinutes
exports.subMonthsImpl = dateFns.subMonths
exports.subQuartersImpl = dateFns.subQuarters
exports.subSecondsImpl = dateFns.subSeconds
exports.subWeeksImpl = dateFns.subWeeks
exports.subYearsImpl = dateFns.subYears
fork icon0
star icon2
watch icon1

+ 16 other calls in file

78
79
80
81
82
83
84
85
86
87
  endDate = new Date();
  startDate = subMonths(new Date(),1);
}
else if(reportUser[0].reporttype === "Quarterly"){
  endDate = new Date();
  startDate = subQuarters(new Date(),1);
}
else if(reportUser[0].reporttype === "Bi-Annually"){
  endDate = new Date();
  startDate = subQuarters(new Date(),2)
fork icon0
star icon0
watch icon0

+ 3 other calls in file

Other functions in date-fns

Sorted by popularity

function icon

date-fns.format is the most popular function in date-fns (3838 examples)