-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Confusing behavior when converting StepRange{<:Dates.TimeType,<:Dates.Period} to numeric range #10451
Comments
I'm not sure what we could do differently here, apart from defining custom conversion methods for I'm not sure if it would totally solve the problem here, but I've thought of extending |
The problem here is that cc: @JeffBezanson - this could be another good example of why vectorization is bad. |
If ranges are to be taken seriously as As you say, getting rid of vectorized conversion functions like |
The problem seems to be that we're inconsistent on what |
As discussed with @quinnj offline, the problem is that One possible solution is to disallow both meanings in favor of another function, possibly |
This is fixed by #19920. |
Conversions of ranges involving dates and times do not always preserve length.
The problem appears to lie in the conversion of the step,
int(Dates.Day(1)) == float(Dates.Day(1)) == int(Dates.Millisecond(1)) == 1
, which results in an incommensurate conversion of the entire range. (7689600001 is the correct answer if the step is 1 millisecond.)The text was updated successfully, but these errors were encountered: