Skip to content
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

Change how StepRange gets its 'unit' in creating an empty range #7900

Merged
merged 1 commit into from
Aug 8, 2014
Merged

Conversation

quinnj
Copy link
Member

@quinnj quinnj commented Aug 7, 2014

Instead of relying on one(step) to create the empty range representation, get's the natural step of the StepRange through stop - start. The former behavior resulted in the following for date ranges:

julia> dr = Date(2014,1,1):Year(1):Date(2013,12,31) # empty range with start > stop and positive step
2014-01-01:1 year:2013-01-01

cc: @JeffBezanson
This doesn't need to be 0.3, but I don't know that it hurts anything if we want to get it out of the way.

@StefanKarpinski
Copy link
Sponsor Member

This kind of seems like a bug fix to me, in which case it makes sense to merge for 0.3.

JeffBezanson added a commit that referenced this pull request Aug 8, 2014
Change how StepRange gets its 'unit' in creating an empty range
@JeffBezanson JeffBezanson merged commit 97c7043 into JuliaLang:master Aug 8, 2014
@quinnj
Copy link
Member Author

quinnj commented Aug 8, 2014

Thanks!

quinnj added a commit that referenced this pull request Aug 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants