DateRange¶
- class sofia_redux.scan.configuration.dates.DateRange(text)[source]¶
Bases:
ABC
Initialize a date range from a text string.
The date range consists of a start and end date time.
- Parameters:
- textstr
A date key of the form start–stop where start and stop can be either * indicating no value, an ISOT str or mjd number value, both in the UTC scale.
Methods Summary
copy
()Return a copy of the DateRange object.
parse_range
(text)Parse and apply a string containing the date range.
to_time
(thing)Convert a date-time like object to a consistent time object.
Methods Documentation
- parse_range(text)[source]¶
Parse and apply a string containing the date range.
- Parameters:
- textstr
A date key of the form start–stop where start and stop can be either * indicating no value, an ISOT str or mjd number value, both in the UTC scale.
- Returns:
- None
- static to_time(thing)[source]¶
Convert a date-time like object to a consistent time object.
- Parameters:
- thingstr or int or float or Time
The object to convert. If a string is used, it should be in ISOT format in UTC scale. Integers and floats will be parsed as MJD times in the UTC scale.
- Returns:
- timeTime