-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
Closed
Labels
DatetimeDatetime data dtypeDatetime data dtypeNeeds DiscussionRequires discussion from core team before further actionRequires discussion from core team before further action
Description
ts = pd.Timestamp("001-01-01")
td = pd.Timedelta(days=1).as_unit("s")
>>> ts - td
Timestamp('0-12-31 00:00:00')
>>> (ts - td).year
0We document in a few places that we are using the Proleptic Gregorian calendar which does not have a year 0. The year before 1AD is 1BC in this calendar.
np.datetime64 objects have the same behavior (cc @sberg)
Expected Behavior
Refuse to parse year 0, create a Timestamp with year=0, subtraction skips year 0.
Or document the current behavior.
Metadata
Metadata
Assignees
Labels
DatetimeDatetime data dtypeDatetime data dtypeNeeds DiscussionRequires discussion from core team before further actionRequires discussion from core team before further action