icu4x icon indicating copy to clipboard operation
icu4x copied to clipboard

Add a ZonedTime type

Open sffc opened this issue 11 months ago • 11 comments

It can live next to ZonedDateTime.

Why: in order to use TimeFormatter to format a time and a zone together.

Other solutions considered but infeasible:

  1. Use ZonedDateTime: no, it has a calendar, but TimeFormatter has the () calendar
  2. Implement InFixedCalendar<()> for ZonedDateTime: no, this breaks type inference for everyone else
  3. Add format_any_calendar to TimeFormatter: possible, but seems confusing; ZonedTime is better

@Manishearth @robertbastian

sffc avatar Dec 20 '24 01:12 sffc