Skip to content

fix(ui): overnight class times render as two full dates #325

Closed

Description

@antontcymbal

Summary

A class that ends after midnight shows its time as two full dates — "10/27/2026, 9:30 PM – 10/28/2026, 12:30 AM" — instead of "9:30 PM – 12:30 AM", on the class page, list cards and the pin popover.

Approach

formatTimeRange (src/lib/time.ts:71-85) formats with Intl.DateTimeFormat#formatRange using only hour/minute options. When the two instants fall on different calendar days, formatRange adds the dates. Format the start and end separately when they fall on different days and join them with the range separator (or format the end against the start's day), so the line stays a time range. A fix exists on branch ux/147-a-one-sheet (found while prototyping the add-a-class flow).

Acceptance criteria

  • A 21:30–00:30 session in Europe/London renders as "9:30 – 12:30 AM" style time-only text in en, with no dates.
  • Same-day ranges render exactly as today.

Verification checklist

  • pnpm test:run src/lib/time.test.ts with a new case for an overnight range.
  • node -e check: formatTimeRange for 2026-10-27 21:30 → 2026-10-28 00:30 Europe/London contains no "/".

Notes

Found while building the add-a-class prototypes (2026-10-25); affects any published class ending after midnight.

Activity

  1. added theissue type on Oct 25, 2026
  2. moved this from Proposed to Revising in SYDevelopers Technical Roadmapon Oct 25, 2026
  3. Ardnived commented on Oct 25, 2026

    @Ardnived
    Contributor

    @sydevs-bot implement

  4. moved this from Revising to Approved in SYDevelopers Technical Roadmapon Oct 25, 2026
  5. added
    bot:working
    on Oct 25, 2026
  6. sydevs-bot commented on Oct 25, 2026

    @sydevs-bot
    Contributor

    🤖 no session running

    recent dispatches
    • 06:31Z implement · attempt 2 · session · done
    • 06:31Z implement · attempt 2 · session
    • 19:26Z implement · attempt 1 · session · timed out
    • 19:26Z implement · attempt 1 · session

    Written by the sydevs dispatcher. Sessions never edit this comment.

  7. added
    bot:working
    and removed
    bot:working
    on Oct 26, 2026
  8. removed
    bot:working
    on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Priority

    Medium

    Hold Until

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions