Skip to content

Commit 068c079

Browse files
DOC: Add SA01 ES01 for pandas.Timestamp.is_leap_year (#58753)
* DOC: add SA01 ES01 for pandas.Timestamp.is_leap_year * DOC: remove SA01 ES01 for pandas.Timestamp.is_leap_year
1 parent 810fe4f commit 068c079

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

ci/code_checks.sh

-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
259259
-i "pandas.Timestamp.fromordinal SA01" \
260260
-i "pandas.Timestamp.fromtimestamp PR01,SA01" \
261261
-i "pandas.Timestamp.hour GL08" \
262-
-i "pandas.Timestamp.is_leap_year SA01" \
263262
-i "pandas.Timestamp.isocalendar SA01" \
264263
-i "pandas.Timestamp.isoweekday SA01" \
265264
-i "pandas.Timestamp.max PR02" \

pandas/_libs/tslibs/timestamps.pyx

+11
Original file line numberDiff line numberDiff line change
@@ -820,9 +820,20 @@ cdef class _Timestamp(ABCTimestamp):
820820
"""
821821
Return True if year is a leap year.
822822

823+
A leap year is a year, which has 366 days (instead of 365) including 29th of
824+
February as an intercalary day. Leap years are years which are multiples of
825+
four with the exception of years divisible by 100 but not by 400.
826+
823827
Returns
824828
-------
825829
bool
830+
True if year is a leap year, else False
831+
832+
See Also
833+
--------
834+
Period.is_leap_year : Return True if the period’s year is in a leap year.
835+
DatetimeIndex.is_leap_year : Boolean indicator if the date belongs to a
836+
leap year.
826837

827838
Examples
828839
--------

0 commit comments

Comments
 (0)