Skip to content

DOC: Add SA01 ES01 for pandas.Timestamp.is_leap_year #58753

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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.Timestamp.fromordinal SA01" \
-i "pandas.Timestamp.fromtimestamp PR01,SA01" \
-i "pandas.Timestamp.hour GL08" \
-i "pandas.Timestamp.is_leap_year SA01" \
-i "pandas.Timestamp.isocalendar SA01" \
-i "pandas.Timestamp.isoweekday SA01" \
-i "pandas.Timestamp.max PR02" \
Expand Down
11 changes: 11 additions & 0 deletions pandas/_libs/tslibs/timestamps.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -820,9 +820,20 @@ cdef class _Timestamp(ABCTimestamp):
"""
Return True if year is a leap year.

A leap year is a year, which has 366 days (instead of 365) including 29th of
February as an intercalary day. Leap years are years which are multiples of
four with the exception of years divisible by 100 but not by 400.

Returns
-------
bool
True if year is a leap year, else False

See Also
--------
Period.is_leap_year : Return True if the period’s year is in a leap year.
DatetimeIndex.is_leap_year : Boolean indicator if the date belongs to a
leap year.

Examples
--------
Expand Down
Loading