whisper-money/resources/js/lib
Víctor Falcón a19a8d52ec
Fix: Use locale to disambiguate date format during CSV import (#107)
## Summary
- When CSV dates are ambiguous (e.g. `05/03/2024` parses as both
DD-MM-YYYY and MM-DD-YYYY), the auto-detection heuristic now uses the
user's locale preference as a tie-breaker instead of relying on array
order
- Adds `getLocaleDateFormat()` helper that maps locale strings to their
expected date format (US → MM-DD-YYYY, most others → DD-MM-YYYY, CJK →
YYYY-MM-DD)
- Passes locale from Inertia shared props to both transaction and
balance import flows

Closes #100

## Test plan
- [x] Added 15 Vitest tests for `getLocaleDateFormat` and
`autoDetectDateFormat` with locale tie-breaking
- [ ] Manual test: Import CSV with ambiguous dates (day ≤ 12) using a
non-US locale, verify DD-MM-YYYY is preferred
- [ ] Manual test: Import CSV with unambiguous dates (day > 12), verify
locale does NOT override correct detection
2026-02-12 09:08:52 +01:00
..
balance-import-config-storage.ts fix: add SSR guards to localStorage/sessionStorage access 2025-12-08 18:19:20 +01:00
chart-calculations.test.ts feat: add multiple chart view modes for net worth evolution (#37) 2025-12-30 07:22:19 +01:00
chart-calculations.ts feat: add multiple chart view modes for net worth evolution (#37) 2025-12-30 07:22:19 +01:00
crypto.ts Add some toast notifications 2025-11-11 11:39:28 +00:00
debug.ts fix: make useIsMobile hook and utility functions SSR-safe 2025-12-08 17:33:54 +01:00
dexie-db.ts Add Budgeting Feature to Track and Manage Spending (#36) 2026-01-21 15:25:50 +01:00
file-parser.test.ts Fix: Use locale to disambiguate date format during CSV import (#107) 2026-02-12 09:08:52 +01:00
file-parser.ts Fix: Use locale to disambiguate date format during CSV import (#107) 2026-02-12 09:08:52 +01:00
import-config-storage.ts fix: add SSR guards to localStorage/sessionStorage access 2025-12-08 18:19:20 +01:00
key-storage.ts fix: make encryption key storage SSR-safe to prevent 502 errors 2025-12-08 17:13:45 +01:00
posthog.ts feat: Add PostHog (#70) 2026-01-20 10:47:59 +01:00
rule-builder-utils.ts Smart rules: Change operator to `OR` by default (#7) 2025-12-03 10:16:29 +01:00
rule-engine.ts Remove encryption from bank account names (#104) 2026-02-09 14:15:26 +01:00
sankey-utils.ts feat: Group small expending categories on the Sankey chart 2026-01-11 19:04:20 +01:00
sync-manager.ts chore: Simplify IndexedDB sync by moving to Inertia shared props (#63) 2026-01-19 19:15:26 +01:00
utils.ts Prevent duplicate notes when re-evaluating automation rules 2025-12-04 16:42:54 +01:00