Commit 44b00a3
Normative: Require NanosecondsToDays remainder less than day length
When converting a number of nanoseconds to a number of days and a
nanoseconds remainder, the remainder shouldn't be longer than the length
of the last day.
This could happen due to shenanigans in a custom time zone's
getOffsetNanosecondsFor or getPossibleInstantsFor methods, or a custom
calendar's dateAdd method.
See: #2357
UPSTREAM_COMMIT=ac69b63a5904620d0271238f028b4cee068bfcad1 parent 0b238cc commit 44b00a3
File tree
2 files changed
+15
-9
lines changed- lib
- test
2 files changed
+15
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
240 | 249 | | |
241 | 250 | | |
242 | 251 | | |
| |||
3461 | 3470 | | |
3462 | 3471 | | |
3463 | 3472 | | |
3464 | | - | |
| 3473 | + | |
3465 | 3474 | | |
3466 | 3475 | | |
3467 | 3476 | | |
| |||
3471 | 3480 | | |
3472 | 3481 | | |
3473 | 3482 | | |
3474 | | - | |
| 3483 | + | |
3475 | 3484 | | |
3476 | 3485 | | |
3477 | | - | |
| 3486 | + | |
3478 | 3487 | | |
3479 | 3488 | | |
| 3489 | + | |
| 3490 | + | |
| 3491 | + | |
3480 | 3492 | | |
3481 | 3493 | | |
3482 | 3494 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
98 | 97 | | |
99 | 98 | | |
100 | 99 | | |
| |||
369 | 368 | | |
370 | 369 | | |
371 | 370 | | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | 371 | | |
376 | | - | |
377 | | - | |
378 | 372 | | |
379 | 373 | | |
380 | 374 | | |
| |||
0 commit comments