Cool. So would you give your blessings to something like this?
- algorithms that need absolute accuracy should only accept actual discrete time periods, in their method signature. So they can’t accept floats or some such.
- algorithms that don’t rely on such high levels of accuracy can accept:
- a
Number
where their docs say it should be seconds/minutes/etc… - a
Unitful.jl
time unit -
DatesTime
/Time
instance
- a
I think #2 is best in the case where accuracy is not an issue. This way whoever needs the accuracy can enforce it, and whoever wants some flexibility can have it.