chore: document date formatting scope and evaluate date-fns if requirements grow
Summary
formatToIST() in src/lib/utils.ts is a single-purpose formatter for the
Asia/Kolkata timezone. It is currently sufficient but is a custom implementation
with no tests.
Trigger for Action
If any of the following arise, adopt date-fns + date-fns-tz:
- Relative time display ("2 hours ago")
- Date arithmetic (add/subtract days, weeks)
- Multiple timezone support
- Date range calculations
Immediate Action
Add a comment above formatToIST() documenting the known limitation and the
threshold for adopting a library:
// Single-purpose IST formatter. If date handling requirements grow (relative
// times, arithmetic, multiple timezones), replace with date-fns + date-fns-tz.
References
- date-fns: https://date-fns.org/ (MIT)
- date-fns-tz: https://github.com/marnusw/date-fns-tz (MIT)
Labels: chore, tech-debt