Skip to content

Closes bpo-28281: Remove year (1-9999) limits on the weekday() function. #4109

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

Merged
merged 3 commits into from
Oct 26, 2017

Conversation

abalkin
Copy link
Member

@abalkin abalkin commented Oct 24, 2017

A patch by Mark Gollahon.

https://bugs.python.org/issue28281

@taleinat
Copy link
Contributor

For reference, this is awaiting documentation improvements, to be done either by the original author or by @abalkin.

Small reminder, @abalkin, to make sure the original author has signed a CLA.

Lib/calendar.py Outdated
@@ -111,8 +111,10 @@ def leapdays(y1, y2):


def weekday(year, month, day):
"""Return weekday (0-6 ~ Mon-Sun) for year (1970-...), month (1-12),
day (1-31)."""
"""Return weekday (0-6 ~ Mon-Sun) for year (MINYEAR-MAXYEAR),
Copy link
Member

Choose a reason for hiding this comment

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

But this patch makes years out of range MINYEAR-MAXYEAR be supported.

@abalkin
Copy link
Member Author

abalkin commented Oct 26, 2017

@taleinat - yes, according to the bpo, Mark Gollahon has signed a CLA.

@abalkin abalkin self-assigned this Oct 26, 2017
@abalkin abalkin merged commit 66c88ce into python:master Oct 26, 2017
serhiy-storchaka pushed a commit that referenced this pull request Jan 29, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 29, 2024
The limit was removed in 66c88ce (pythonGH-4109).
(cherry picked from commit 0f54ee4)

Co-authored-by: Steven Ward <planet36@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 29, 2024
The limit was removed in 66c88ce (pythonGH-4109).
(cherry picked from commit 0f54ee4)

Co-authored-by: Steven Ward <planet36@users.noreply.github.com>
serhiy-storchaka pushed a commit that referenced this pull request Jan 29, 2024
) (GH-114722)

The limit was removed in 66c88ce (GH-4109).
(cherry picked from commit 0f54ee4)

Co-authored-by: Steven Ward <planet36@users.noreply.github.com>
serhiy-storchaka pushed a commit that referenced this pull request Jan 29, 2024
) (GH-114723)

The limit was removed in 66c88ce (GH-4109).
(cherry picked from commit 0f54ee4)

Co-authored-by: Steven Ward <planet36@users.noreply.github.com>
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
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.

5 participants