date32 type represents a particular calendar date without a time
component. Internally, this type is stored as a 32-bit signed integer
counting the number of days since 1970-01-01 (“the epoch”). Thus, this
type accommodates dates within the range of approximately ±5.8 million
The calendar used for this type is proleptic Gregorian, meaning that it extends the modern-day Gregorian calendar into the past before this calendar was first adopted, and into the future, long after it will have been replaced.
This type corresponds to
datetime.date in Python,
np.dtype('<M8[D]') in numpy.
datetime.date object can accommodate dates from year 1 to
year 9999, which is much smaller than what our
date32 type allows.
As a consequence, when
date32 values that are outside of year range
1-9999 are converted to python, they become integers instead of
For the same reason the
.max properties of this
type also return integers.
from datetime import date DT = dt.Frame([date(2020, 1, 30), date(2020, 3, 11), None, date(2021, 6, 15)]) DT.type
dt.Frame([dt.Type.date32.min, date(2021, 6, 15), dt.Type.date32.max], stype='date32')