feat: human-readable date format with timezone awareness #68

Merged
shoko merged 1 commits from fix/issue-54 into main 2026-04-04 09:20:43 +02:00
Owner

Summary

Implements issue #54: Human-readable date format with timezone awareness.

Changes

  1. New format_due_date() function - Formats Unix timestamps as:

    • 4 April 2026 (date only)
    • 4 April 2026 14:30 (Asia/Jakarta) (with time and timezone)
  2. Updated format_bounty() - Now accepts optional room_id to get timezone from room config

  3. Updated commands:

    • /bounty - Shows dates with room timezone
    • /my - Shows dates with room timezone
    • /add - Shows due date with room timezone

Example Output

[#1] Fix login bug | ⏰ 4 April 2026 14:30 (Asia/Jakarta) (TODAY) | by 123456

Testing

All 97 tests pass.

Fixes #54

## Summary Implements issue #54: Human-readable date format with timezone awareness. ### Changes 1. **New `format_due_date()` function** - Formats Unix timestamps as: - `4 April 2026` (date only) - `4 April 2026 14:30 (Asia/Jakarta)` (with time and timezone) 2. **Updated `format_bounty()`** - Now accepts optional `room_id` to get timezone from room config 3. **Updated commands**: - `/bounty` - Shows dates with room timezone - `/my` - Shows dates with room timezone - `/add` - Shows due date with room timezone ### Example Output ``` [#1] Fix login bug | ⏰ 4 April 2026 14:30 (Asia/Jakarta) (TODAY) | by 123456 ``` ### Testing All 97 tests pass. Fixes #54
shoko added 1 commit 2026-04-04 09:19:34 +02:00
- Add format_due_date() function that formats dates as '4 April 2026'
  or '4 April 2026 14:30 (Asia/Jakarta)' with timezone support
- Update format_bounty() to use timezone-aware date formatting
- Update cmd_bounty, cmd_my, cmd_add to pass room_id for timezone
- Dates now display in room's configured timezone
- Fixes #54
shoko merged commit 922858a81a into main 2026-04-04 09:20:43 +02:00
Sign in to join this conversation.