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
Use rounding according to the string format in precisedelta
%d and %0.0f do not produce the same values. So we will first apply the
required formatting and turn the formatted string back into a float or int.
YEARS needs to be treated slightly differently as it needs to be formatted
with `intcomma`. We first check if the resulting value does not have any
fractional part and if not, we turn it into an int, so that it string
output is what a human would expect.
Added several unittests to highlight some of the differences between
using %d and %.0f as a format in precisedelta.
0 commit comments