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
Assuming there's no reason not to support these Periods, i believe this is just a bug in the print defintions.
There isn't a reason these aren't supported beyond a prefix letter needs to be chosen for these Period types. I do believe Microsecond and Nanosecond didn't exist when this code was originally written.
I'd also suggest defining prefix(T::Type{<:Period}) = error("A prefix for period $T has not yet been defined") or alternatively add a comment to prefix to make this behaviour clearer
The behaviour for printing a
AnchoredInterval{Day(-1)}
is:And this style of
print
is available forAnchoredInterval{T(-1)}
ifT
isDay
,Month
,Year
orMillisecond
,Second
,Minute
,Hour
But errors for
Week
,Quarter
(new in Julia v1.6), orNanosecond
,Microsecond
E.g. for
AnchoredInterval{Week(-1)}
Assuming there's no reason not to support these
Period
s, i believe this is just a bug in theprint
defintions.I think it can be fixed by adding methods to
prefix
:Intervals.jl/src/description.jl
Lines 62 to 68 in f873f70
And adding appropriate tests, like
Intervals.jl/test/anchoredinterval.jl
Lines 429 to 437 in f873f70
originally reported by @Ianlmgoddard
The text was updated successfully, but these errors were encountered: