icu4x icon indicating copy to clipboard operation
icu4x copied to clipboard

Fix negative numbers across icu_calendar

Open sffc opened this issue 1 year ago • 11 comments

Poking around, I keep finding places in icu_calendar where we do the wrong thing with negative numbers. We need to fix this, since one value proposition of ICU4X's calendar crate is that we generate correct results across the range required by Temporal.

I made a branch, iso-negative, with some test cases that are currently failing.

Actions on this ticket:

  • [x] Clone my branch and change the code so that the tests I added can all pass
  • [ ] Add tests to cover all operations that involve signed integers
  • [ ] Fix code that these tests reveal to be broken, perhaps by using the new div_rem_euclid helper function (#2704)

Related: #2151

CC @pt2121 @Manishearth @pandusonu2

sffc avatar Oct 03 '22 02:10 sffc