File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -984,6 +984,31 @@ cdef class _Timestamp(ABCTimestamp):
984
984
"""
985
985
return super().day
986
986
987
+ @property
988
+ def fold(self) -> int:
989
+ """
990
+ Return the fold value of the Timestamp, which indicates whether the time is in the
991
+ fold of a transition (typically during daylight saving time transitions).
992
+
993
+ Returns
994
+ -------
995
+ int
996
+ The fold value of the Timestamp, where 0 indicates the first occurrence
997
+ of the ambiguous time, and 1 indicates the second.
998
+
999
+ See Also
1000
+ --------
1001
+ Timestamp.dst : Return the daylight saving time (DST) adjustment.
1002
+ Timestamp.tzinfo : Return the timezone information associated with the Timestamp.
1003
+
1004
+ Examples
1005
+ --------
1006
+ >>> ts = pd.Timestamp(" 2024-11-03 01:30:00" , fold = 1 , tz = " America/New_York" )
1007
+ >>> ts.fold
1008
+ 1
1009
+ """
1010
+ return super().fold
1011
+
987
1012
@property
988
1013
def month(self) -> int:
989
1014
"""
You can’t perform that action at this time.
0 commit comments