Datetime unit from string #85

wants to merge 2 commits into


None yet

1 participant

NumPy member

Changes to autodetect the datetime unit from the form of the ISO 8601 string. This makes np.datetime64('2011-03-12') have a 'D' unit, for example. Also provide automatic units for 'now' and 'today', and have them throw errors when used with the wrong kind of unit.

Mark Wiebe added some commits Jun 7, 2011
Mark Wiebe ENH: datetime: Automatically detect the unit for scalar construction fcd787b
Mark Wiebe ENH: datetime: Make 'now' and 'today' only parse with appropriate units
In particular, 'now' needs time-like units, and 'today' needs
date-like units.
NumPy member

Moved to datetime_dev pull request.

@mwiebe mwiebe closed this Jun 9, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment