-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add to_datetime and to_timedelta to the Date class
The to_datetime method can be used (optionally with an offset year) to convert a Date to a datetime. The date is clamped to a valid range supported by numpy's datetime64[ns], used by xarray and pandas. This method will be useful for computing datetime bounds on time-series data sets. The to_timedelta method converts a Date object with isInterval==True to a timedelta object.
- Loading branch information
Showing
2 changed files
with
77 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters