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

deprecate Dates.recur in favour of filter #19288

Merged
merged 5 commits into from
Nov 17, 2016
Merged

Conversation

simonbyrne
Copy link
Contributor

Should also indirectly close #17513

cc: @quinnj

@simonbyrne simonbyrne added the dates Dates, times, and the Dates stdlib module label Nov 9, 2016
@quinnj
Copy link
Member

quinnj commented Nov 9, 2016

+1

@@ -1098,4 +1098,16 @@ eval(Base.LinAlg, quote
end
end)

eval(Base.Dates, quote
function recur{T<:TimeType}(fun::Function, dr::StepRange{T};negate::Bool=false, limit::Int=10000)
depwarn(string("Dates.recur is deprecated, use filter instead."),:recur)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The string() part shouldn't be necessary, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, fixed.

Copy link
Sponsor Member

@StefanKarpinski StefanKarpinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, much better for this to be part of filter.

@@ -1102,4 +1102,17 @@ end)
@deprecate den denominator
@deprecate num numerator

# #19288
eval(Base.Dates, quote
function recur{T<:TimeType}(fun::Function, dr::StepRange{T};negate::Bool=false, limit::Int=10000)
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

;negate => ; negate

@omus
Copy link
Member

omus commented Nov 15, 2016

The manual will need to be updated. Particularly doc/manual/dates.rst

@simonbyrne
Copy link
Contributor Author

Good point. Is it worth keeping the text, or should we just get rid of it altogether?

@quinnj
Copy link
Member

quinnj commented Nov 15, 2016

I think it's worth mentioning, particularly since there used to be explicit functionality for this.

@simonbyrne simonbyrne merged commit 01ef3c3 into master Nov 17, 2016
@simonbyrne simonbyrne deleted the sb/date-recur-dep branch November 17, 2016 17:28
omus added a commit to omus/julia that referenced this pull request Nov 21, 2016
simonbyrne pushed a commit that referenced this pull request Nov 21, 2016
@tkelman
Copy link
Contributor

tkelman commented Nov 25, 2016

There was a docstring for this that genstdlib is now warning about. Should that be repurposed as a dates-specific docstring for filter?

@tkelman
Copy link
Contributor

tkelman commented Nov 29, 2016

Bump @simonbyrne there's a stale docstring here giving a warning, should be cleaned up especially if we're about to transition how the docs get built.

@simonbyrne
Copy link
Contributor Author

No, I don't think we need anything date-specific. I'll open a PR to fix it.

simonbyrne added a commit that referenced this pull request Nov 29, 2016
simonbyrne added a commit that referenced this pull request Nov 30, 2016
fcard pushed a commit to fcard/julia that referenced this pull request Feb 28, 2017
* deprecate Dates.recur in favour of filter
fcard pushed a commit to fcard/julia that referenced this pull request Feb 28, 2017
fcard pushed a commit to fcard/julia that referenced this pull request Feb 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dates Dates, times, and the Dates stdlib module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

recur fails when the DateFunction provided returns false outside of the range
6 participants