You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Addition of datetime and duration is not composable #7843
Adding a duration to a partial datetime that only consists of a date basically flattens the duration to day precision instead of turning the date into a datetime. I find this quite surprising:
#letsome-day= datetime(year: 2000, month: 6, day: 5)
#lettwo-hours= duration(hours: 2)
#letval1= some-day+20*two-hours#letval2= some-day#for_inrange(20) {
val2+=two-hours
}
// Equality assertion failed: value datetime(year: 2000, month: 6, day: 6) // was not equal to datetime(year: 2000, month: 6, day: 5)#assert.eq(val1, val2)
Activity