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

Function addDaysToDateString

src/utils/dateUtils.ts:520–534  ·  view source on GitHub ↗
(dateString: string, days: number)

Source from the content-addressed store, hash-verified

518 * Add days to a date string, returning a date string
519 */
520export function addDaysToDateString(dateString: string, days: number): string {
521 try {
522 const parsed = parseDateToLocalInternal(dateString);
523 const result = addDaysFns(parsed, days);
524 return format(result, "yyyy-MM-dd");
525 } catch (error) {
526 tasknotesLogger.error("Error adding days to date string:", {
527 category: "validation",
528 operation: "adding-days-date-string",
529 details: { dateString, days },
530 error: error,
531 });
532 throw error;
533 }
534}
535
536/**
537 * Add weeks to a date string, returning a date string

Callers 3

dateUtils.test.tsFile · 0.90
dateUtils.tsFile · 0.85

Calls 2

parseDateToLocalInternalFunction · 0.85
errorMethod · 0.80

Tested by

no test coverage detected