mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-06 05:40:02 -06:00
Co-authored-by: Johannes <johannes@formbricks.com> Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
14 lines
407 B
TypeScript
14 lines
407 B
TypeScript
import { startOfMonth, startOfQuarter, startOfWeek, subMonths, subQuarters, subWeeks } from "date-fns";
|
|
|
|
export const getStartDateOfLastQuarter = () => {
|
|
return startOfQuarter(subQuarters(new Date(), 1));
|
|
};
|
|
|
|
export const getStartDateOfLastMonth = () => {
|
|
return startOfMonth(subMonths(new Date(), 1));
|
|
};
|
|
|
|
export const getStartDateOfLastWeek = () => {
|
|
return startOfWeek(subWeeks(new Date(), 1));
|
|
};
|