Skip to content

Commit e16a327

Browse files
min and max revert
1 parent dfea777 commit e16a327

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

pandas/_libs/tslibs/timestamps.pyx

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,52 @@ cdef class _Timestamp(ABCTimestamp):
633633
field, freq_name, month_kw, self._creso)
634634
return out[0]
635635

636+
def max(self) -> "Timestamp":
637+
"""
638+
A constant that represents the maximum valid date and time value.
639+
640+
This property returns the highest datetime value that can be represented
641+
by a pandas.Timestamp object, which is equivalent to
642+
pd.Timestamp('2262-04-11 23:47:16.854775807').
643+
644+
Returns
645+
-------
646+
Timestamp
647+
The maximum valid datetime value for a Timestamp object.
648+
649+
See Also
650+
--------
651+
Timestamp.min : Return the minimum valid date and time value for Timestamp.
652+
653+
Examples
654+
--------
655+
>>> pd.Timestamp.max
656+
Timestamp('2262-04-11 23:47:16.854775807')
657+
"""
658+
659+
def min(self) -> "Timestamp":
660+
"""
661+
Return the minimum representable Timestamp.
662+
663+
This property returns the earliest datetime value that can be represented
664+
by a pandas.Timestamp object, which is equivalent to
665+
pd.Timestamp('1677-09-21 00:12:43.145224193').
666+
667+
Returns
668+
-------
669+
Timestamp
670+
The earliest representable Timestamp.
671+
672+
See Also
673+
--------
674+
Timestamp.max : Return the maximum representable Timestamp.
675+
676+
Examples
677+
--------
678+
>>> pd.Timestamp.min
679+
Timestamp('1677-09-21 00:12:43.145224193')
680+
"""
681+
636682
@property
637683
def is_month_start(self) -> bool:
638684
"""

0 commit comments

Comments
 (0)