jar1
2
Divide by Day(1).
You can also use Dates.value but I think that’s worse because if your input units change and you forget to update you’ll get the wrong result.
For extreme values of days, dividing might lose some precision in the conversion to float.
julia> BigInt(Day(typemax(Int))/Day(1)) - BigInt(typemax(Int))
1
In that case maybe it’s better to use value(d). A best-of-both-worlds solution would be