MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / formatISODate

Function formatISODate

packages/app-core/src/lib/template-render.ts:53–55  ·  view source on GitHub ↗
(date: Date)

Source from the content-addressed store, hash-verified

51
52/** ISO `YYYY-MM-DD` for the given date (local time). */
53export function formatISODate(date: Date): string {
54 return `${date.getFullYear()}-${pad2(date.getMonth() + 1)}-${pad2(date.getDate())}`
55}
56
57function formatTime(date: Date): string {
58 return `${pad2(date.getHours())}:${pad2(date.getMinutes())}`

Callers 1

substituteTokensFunction · 0.70

Calls 1

pad2Function · 0.70

Tested by

no test coverage detected