icu4x icon indicating copy to clipboard operation
icu4x copied to clipboard

Reconsider shape of DateDuration

Open sffc opened this issue 3 months ago • 1 comments

In #6992, I landed a model for DateDuration that corresponds to the requirements of Temporal, specifically that it is signed, and all fields must share the same sign.

I pushed a DateDuration with public fields, including a bool is_negative. This might not be the most ergonomic design. Better might be a struct with private fields and getters that return signed values.

CC @robertbastian

sffc avatar Oct 09 '25 22:10 sffc

We should also consider whether we should be sharing types with DurationFormat's Duration (which is a date/time duration)

Manishearth avatar Oct 30 '25 18:10 Manishearth