7 lines
200 B
TypeScript
7 lines
200 B
TypeScript
export function getCurrentPeriodKey(date = new Date()): string {
|
|
const year = date.getUTCFullYear();
|
|
const month = String(date.getUTCMonth() + 1).padStart(2, "0");
|
|
|
|
return `${year}-${month}`;
|
|
}
|