MCPcopy Create free account
hub / github.com/Vespa314/cflow / getNormalizedDateString

Function getNormalizedDateString

web/src/helpers/datetime.ts:14–23  ·  view source on GitHub ↗
(t?: Date | number | string)

Source from the content-addressed store, hash-verified

12}
13
14export function getNormalizedDateString(t?: Date | number | string): string {
15 const tsFromDate = getTimeStampByDate(t ? t : Date.now());
16 const d = new Date(tsFromDate);
17
18 const year = d.getFullYear();
19 const month = d.getMonth() + 1;
20 const date = d.getDate();
21
22 return `${year}/${month}/${date}`;
23}
24
25/**
26 * Get a time string to provided time.

Callers 1

DailyReviewFunction · 0.90

Calls 1

getTimeStampByDateFunction · 0.85

Tested by

no test coverage detected