mirror of
https://github.com/escalante29/WealthySmart.git
synced 2026-07-17 13:28:46 +02:00
Localization sweep: shared es-CR dates module, no more en-US strays
src/lib/dates.ts is the single source for month names and date formatting; the three per-page month arrays are gone (with an off-by-one guard — the shared array is 1-indexed). formatDate and the Analytics chart tooltips now speak es-CR, Analytics headings are Spanish, and the cycle selector says 'Todo el período' (UX-19, FE-17, UX-07). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { formatShortDate } from './dates';
|
||||
|
||||
export function formatAmount(amount: number, currency: string) {
|
||||
const abs = Math.abs(amount);
|
||||
if (currency === 'BTC') return abs.toFixed(8);
|
||||
@@ -17,5 +19,5 @@ export function formatLocalDatetime(d: Date): string {
|
||||
}
|
||||
|
||||
export function formatDate(dateStr: string) {
|
||||
return new Date(dateStr).toLocaleDateString('en-US', { month: 'short', day: 'numeric' });
|
||||
return formatShortDate(dateStr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user