MCPcopy Index your code
hub / github.com/callumalpass/tasknotes / getCurrentDateString

Function getCurrentDateString

src/utils/dateUtils.ts:786–794  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

784 * Get current date in YYYY-MM-DD format for completion dates
785 */
786export function getCurrentDateString(): string {
787 // For user actions (task completion), use local date extraction
788 // This ensures completion is recorded as user's local calendar day
789 const now = new Date();
790 const year = now.getFullYear();
791 const month = String(now.getMonth() + 1).padStart(2, "0");
792 const day = String(now.getDate()).padStart(2, "0");
793 return `${year}-${month}-${day}`;
794}
795
796/**
797 * Safe timestamp parsing for display and comparison

Calls 1

getDateMethod · 0.65

Tested by

no test coverage detected