Skip to content

Commit

Permalink
DOC: Add SA01 ES01 for pandas.Timestamp.is_leap_year (#58753)
Browse files Browse the repository at this point in the history
* DOC: add SA01 ES01 for pandas.Timestamp.is_leap_year

* DOC: remove SA01 ES01 for pandas.Timestamp.is_leap_year
  • Loading branch information
tuhinsharma121 committed May 17, 2024
1 parent 810fe4f commit 068c079
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 0 additions & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,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

0 comments on commit 068c079

Please sign in to comment.