Files
documenso/packages/lib/universal/monthly-period.ts
T
2026-06-01 17:26:51 +10:00

8 lines
239 B
TypeScript

/** Current UTC calendar month as `YYYY-MM`. */
export const currentMonthlyPeriod = (): string => {
const now = new Date();
const month = String(now.getUTCMonth() + 1).padStart(2, '0');
return `${now.getUTCFullYear()}-${month}`;
};