Bug 1868962 - Part 9: Simplify NanosecondsToDays. r=sfink
commited2632d9261934481e64f5263cb457bb79958808
authorAndré Bargull <andre.bargull@gmail.com>
Fri, 15 Dec 2023 10:24:52 +0000 (15 10:24 +0000)
committerAndré Bargull <andre.bargull@gmail.com>
Fri, 15 Dec 2023 10:24:52 +0000 (15 10:24 +0000)
treedac49923edfbff5c40cab0bdda67272f2155728a
parent10dac1548533558a992794eba8db43fae9cc052d
Bug 1868962 - Part 9: Simplify NanosecondsToDays. r=sfink

Part 8 ensures that the initial value of `days` doesn't exceed ±200'000'000. This
allows to change `days` from `double` to `int64_t`, because overflowing an `int64`
value which starts at ±200'000'000 and can only incremented by one can't happen in
a reasonable amount of time.

Differential Revision: https://phabricator.services.mozilla.com/D195872
js/src/builtin/temporal/ZonedDateTime.cpp