Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
2 changes: 0 additions & 2 deletions ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.Timedelta.resolution PR02" \
-i "pandas.Timedelta.to_timedelta64 SA01" \
-i "pandas.TimedeltaIndex.to_pytimedelta RT03,SA01" \
-i "pandas.Timestamp.max PR02" \
-i "pandas.Timestamp.min PR02" \
-i "pandas.Timestamp.nanosecond GL08" \
-i "pandas.Timestamp.resolution PR02" \
-i "pandas.Timestamp.tzinfo GL08" \
Expand Down
46 changes: 46 additions & 0 deletions pandas/_libs/tslibs/timestamps.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,52 @@ cdef class _Timestamp(ABCTimestamp):
field, freq_name, month_kw, self._creso)
return out[0]

def max(self) -> "Timestamp":
"""
A constant that represents the maximum valid date and time value.

This property returns the highest datetime value that can be represented
by a pandas.Timestamp object, which is equivalent to
pd.Timestamp('2262-04-11 23:47:16.854775807').

Returns
-------
Timestamp
The maximum valid datetime value for a Timestamp object.

See Also
--------
Timestamp.min : Return the minimum valid date and time value for Timestamp.

Examples
--------
>>> pd.Timestamp.max
Timestamp('2262-04-11 23:47:16.854775807')
"""

def min(self) -> "Timestamp":
"""
Return the minimum representable Timestamp.

This property returns the earliest datetime value that can be represented
by a pandas.Timestamp object, which is equivalent to
pd.Timestamp('1677-09-21 00:12:43.145224193').

Returns
-------
Timestamp
The earliest representable Timestamp.

See Also
--------
Timestamp.max : Return the maximum representable Timestamp.

Examples
--------
>>> pd.Timestamp.min
Timestamp('1677-09-21 00:12:43.145224193')
"""

@property
def is_month_start(self) -> bool:
"""
Expand Down
Loading