(dateString: string, weeks: number)
| 537 | * Add weeks to a date string, returning a date string |
| 538 | */ |
| 539 | export function addWeeksToDateString(dateString: string, weeks: number): string { |
| 540 | try { |
| 541 | const parsed = parseDateToLocalInternal(dateString); |
| 542 | const result = addWeeks(parsed, weeks); |
| 543 | return format(result, "yyyy-MM-dd"); |
| 544 | } catch (error) { |
| 545 | tasknotesLogger.error("Error adding weeks to date string:", { |
| 546 | category: "validation", |
| 547 | operation: "adding-weeks-date-string", |
| 548 | details: { dateString, weeks }, |
| 549 | error: error, |
| 550 | }); |
| 551 | throw error; |
| 552 | } |
| 553 | } |
| 554 | |
| 555 | /** |
| 556 | * Add months to a date string, returning a date string |
no test coverage detected