MCPcopy Create free account
hub / github.com/dailydotdev/apps / parseArchivePeriod

Function parseArchivePeriod

packages/shared/src/lib/archive.ts:23–32  ·  view source on GitHub ↗
(periodStart: string | Date)

Source from the content-addressed store, hash-verified

21}
22
23export function parseArchivePeriod(periodStart: string | Date): {
24 year: number;
25 month: number;
26} {
27 const date = new Date(periodStart);
28 return {
29 year: getYear(date),
30 month: getMonth(date) + 1,
31 };
32}
33
34export function getArchivePeriodLabel(archive: {
35 periodType: ArchivePeriodType;

Callers 4

ArchiveMonthCardFunction · 0.90
getArchivePeriodLabelFunction · 0.85
getArchiveUrlFromArchiveFunction · 0.85
groupArchivesByYearFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected