()
| 784 | * Get current date in YYYY-MM-DD format for completion dates |
| 785 | */ |
| 786 | export 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 |
no test coverage detected