Private
Public Access
1
0

Fix date display timezone shift and revert to standard monthly interest

formatDate was parsing UTC timestamps in local time, shifting dates
back a day in western timezones. Strip the time portion before parsing
so dates display correctly.

Revert interest calculation from daily accrual back to standard monthly
compounding (rate/12) with per-payment rounding. This matches how
mortgage servicers calculate interest and produces correct amortization
schedules.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Catherine Renelle
2026-02-14 17:26:55 -05:00
parent 0f3ad89c59
commit 428e18bb41
2 changed files with 5 additions and 11 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ export function formatCurrency(amount: number): string {
}
export function formatDate(date: string): string {
return format(parseISO(date), 'MM/dd/yyyy')
return format(parseISO(date.split('T')[0]), 'MM/dd/yyyy')
}
export function formatDateTime(date: string): string {