MCPcopy Create free account
hub / github.com/callumalpass/tasknotes / createUTCDateFromStorageDate

Function createUTCDateFromStorageDate

src/ui/taskCardState.ts:24–32  ·  view source on GitHub ↗
(datePart: string)

Source from the content-addressed store, hash-verified

22}
23
24function createUTCDateFromStorageDate(datePart: string): Date | null {
25 const match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(datePart);
26 if (!match) {
27 return null;
28 }
29
30 const [, year, month, day] = match;
31 return new Date(Date.UTC(Number(year), Number(month) - 1, Number(day)));
32}
33
34function getTodayTaskCardTargetDate(): Date {
35 const todayLocal = new Date();

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected