-
Notifications
You must be signed in to change notification settings - Fork 0
TimeBackground
Comments on various relevant technologies.
- Only supports a year range of [1, 9999], but UDUNITS allows [-9999, 9999].
Without an established standard reference, the concept of day-of-week is not well defined. Similarly, the proleptic-Gregorian ordinal is also not well defined.
- Why is it limited to a year range of [1, 9999]?
- Can we drop the time zone component?
-
datetime360.date
: - Class methods dropped: today, fromtimestamp, fromordinal
- Methods dropped: timetuple, toordinal, weekday, isoweekday, isocalenday, isoformat (just use
__str__
), ctime - Methods modified: strftime (some format directives are not valid)
-
datetime360.datetime
: - Class methods dropped: now, utcnow, fromtimestamp, utcfromtimestamp
- Methods dropped: timetz, ctime, timetuple, utctimetuple, isoformat, utcoffset, tzname, dst, astimezone
- Class methods modified: strptime (some format directives are not valid)
- Missing methods: strftime
-
Extend via custom dtype.
-
Version 1.6 (but seemingly not 1.5 or 1.7) has a bug which prevents user-defined dtypes from participating in standard ufuncs.
-
Version 1.7+ will not automatically create arrays of the right dtype unless the scalar type is a subclass of
np.generic
. This would add an awkward asymmetry if we define our own dtype for Gregorian datetimes usingdatetime.datetime
as the scalar. Similarly, it makes it awkward to define a our own dtype fordatetime.timedelta
. -
Instead of
datetime.timedelta
(which has a range of ~280000 years in a 360-day calendar, and microsecond resolution), we could usenp.timedelta64[us]
(which has a range of ~290000 years w/ microsecond resolution). -
Should we use
np.datetime64
instead ofdatetime.datetime
? Should we always use microsecond resolution?
- Array
DateTimeIndex
is a subclass ofndarray
- Always uses
M8[ns]
so has a range of 1970 +/-292 years. - Extra attributes/methods to provide access to day, month, convert to
datetime.datetime
, etc. - Extra metadata to record "frequency" and time zone.
- Scalar
Timestamp
is a subclass ofdatetime.datetime
- Extra resolution to record nanoseconds
- Extra metadata to record "frequency"
- https://groups.google.com/forum/#!topic/pydata/JgCgQGpgkC8