diff --git a/ci/code_checks.sh b/ci/code_checks.sh index f34f0690196ed..1f49c2e02b8e4 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -333,7 +333,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Timestamp.tzname SA01" \ -i "pandas.Timestamp.unit SA01" \ -i "pandas.Timestamp.utcfromtimestamp PR01,SA01" \ - -i "pandas.Timestamp.utcnow SA01" \ -i "pandas.Timestamp.utcoffset SA01" \ -i "pandas.Timestamp.utctimetuple SA01" \ -i "pandas.Timestamp.value GL08" \ diff --git a/pandas/_libs/tslibs/nattype.pyx b/pandas/_libs/tslibs/nattype.pyx index 0108fc8fb7eed..729333c1151c5 100644 --- a/pandas/_libs/tslibs/nattype.pyx +++ b/pandas/_libs/tslibs/nattype.pyx @@ -769,6 +769,18 @@ class NaTType(_NaT): Return a new Timestamp representing UTC day and time. + See Also + -------- + Timestamp : Constructs an arbitrary datetime. + Timestamp.now : Return the current local date and time, which + can be timezone-aware. + Timestamp.today : Return the current local date and time with + timezone information set to None. + to_datetime : Convert argument to datetime. + date_range : Return a fixed frequency DatetimeIndex. + Timestamp.utctimetuple : Return UTC time tuple, compatible with + time.localtime(). + Examples -------- >>> pd.Timestamp.utcnow() # doctest: +SKIP diff --git a/pandas/_libs/tslibs/timestamps.pyx b/pandas/_libs/tslibs/timestamps.pyx index c1b615839c8cc..c61e7e43221c8 100644 --- a/pandas/_libs/tslibs/timestamps.pyx +++ b/pandas/_libs/tslibs/timestamps.pyx @@ -1452,6 +1452,18 @@ class Timestamp(_Timestamp): Return a new Timestamp representing UTC day and time. + See Also + -------- + Timestamp : Constructs an arbitrary datetime. + Timestamp.now : Return the current local date and time, which + can be timezone-aware. + Timestamp.today : Return the current local date and time with + timezone information set to None. + to_datetime : Convert argument to datetime. + date_range : Return a fixed frequency DatetimeIndex. + Timestamp.utctimetuple : Return UTC time tuple, compatible with + time.localtime(). + Examples -------- >>> pd.Timestamp.utcnow() # doctest: +SKIP