tududi/frontend
Chris 2444e36f47
Fix date format inconsistency in Task detail screen (#956)
* Fix date format inconsistency in Task detail screen (#938)

Replace browser-dependent toLocaleDateString() with explicit country-based
date formatting to ensure consistent date formats based on user's timezone.

Problem:
- User with English language + Greek timezone saw MM/DD/YYYY format
- Expected DD/MM/YYYY format based on timezone/country
- Browser's Intl.DateTimeFormat had incomplete locale support for
  combined locales like "en-GR"

Solution:
- Add country-to-format mapping in dateUtils.ts (60+ countries)
- New formatDateByCountry() for dates (DD/MM/YYYY, MM/DD/YYYY, YYYY/MM/DD)
- New formatDateTimeByCountry() for datetimes with 24h time
- Update TaskDueDateCard and TaskDeferUntilCard to use new functions
- Uses date-fns for consistent cross-browser formatting

Testing:
- Added 40 comprehensive test cases covering all format types
- Verified with Greece (DD/MM), US (MM/DD), Japan (YYYY/MM/DD)
- All tests passing

Fixes #938

* chore: remove unused import in dateUtils.ts
2026-03-21 18:47:33 +02:00
..
__tests__ Setup slugify and fix nanoid issues 2025-08-08 23:14:40 +03:00
components Fix date format inconsistency in Task detail screen (#956) 2026-03-21 18:47:33 +02:00
config Fix static base path (#549) 2025-11-16 22:43:06 +02:00
constants Cleanup statuses (#724) 2025-12-19 11:13:27 +02:00
contexts Fix static base path (#549) 2025-11-16 22:43:06 +02:00
entities Set stalled projects active without tasks (#793) 2026-01-23 23:06:35 +02:00
hooks Add custom keyboard shortcuts (#749) 2025-12-28 21:58:21 +02:00
store Fix tag links by refreshing tags after creation (#843) 2026-02-27 00:34:10 +02:00
styles Fix bug 661 (#682) 2025-12-08 16:14:10 +02:00
utils Fix date format inconsistency in Task detail screen (#956) 2026-03-21 18:47:33 +02:00
App.tsx Feat: habits (#707) 2025-12-13 08:47:52 +02:00
i18n.ts Fix static base path (#549) 2025-11-16 22:43:06 +02:00
index.tsx Fix static base path (#549) 2025-11-16 22:43:06 +02:00
Layout.tsx Load areas into store (#913) 2026-03-06 08:46:07 +02:00