Files
documenso/packages/lib/server-only/rate-limit/current-monthly-period.ts
T
2026-05-31 00:34:28 +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}`;
};