00:00 | <ptomato> | maybe a more descriptive name would've been [[DeltaDays]] |
00:00 | <shu> | i don't have anything against [[Days]], just didn't understand why |
00:01 | <ptomato> | I can give a more concrete example, maybe |
00:05 | <ptomato> | when you take the difference between two PlainDateTimes, you get the difference between the date parts from the calendar, then you need to take the difference between the time parts (DifferenceTime). the time difference might be negative or wrap around 24h, so the [[Days]] field indicates that you need to adjust your date difference accordingly |
00:09 | <ptomato> | I hope that's not gibberish :-) it's hard to know sometimes how much detail to go into |
00:16 | <shu> | i think so? my confusion is probably because i have a naive understanding of how people do duration math |
00:16 | <shu> | like, i figured the duration between two times, even if it changes days, would still be represented only as some number of hours |
00:18 | <shu> | but it also makes sense to represent that the day changed, that seems more useful than just number of hours |
16:32 | <Richard Gibson> | for a concrete example, there is a difference between a duration of 1 day vs. 24 hours that is observable from Temporal.ZonedDateTime.from("2022-03-13T00:00[America/New_York]").add(Temporal.Duration.from({days: 1})) vs. Temporal.ZonedDateTime.from("2022-03-13T00:00[America/New_York]").add(Temporal.Duration.from({hours: 24})) because of the DST transition |