This class handles dates and times. It handles date
formatting and conversion to and from mission time.
Constructor
- new()
This constructor has three forms:
- new() initializes to the current local date and time
- new(yyyy-mm-dd, hh:mm:ss) initializes to the given date and time
- new(yyyy-mm-ddThh:mm:ss) initializes from the FITS keyword date format
- new(mission_time) initializes from the given mission time in seconds
since the reference time.
.
Accessors
- init_class(refdate, reftime, leapsec)
The following method initializes all the class data needed for conversions
between dates and mission time in seconds.
Refdate and reftime and the date and time at zero elapsed seconds.
Leapsec is the name of the leap second calibration file.
- refdate()
Get or set the reference date class data for date - time conversions.
- reftime()
Get or set the reference time class data for date - time conversions.
- filename()
Get or set the leapsecond file name class data for date - time conversions.
- date()
Return the date in yyyy-mm-dd format.
- time()
Return the time in hh:mm:ss format.
- seconds()
Return the number of seconds since the reference date and time.
- mjd()
Return the Modified Julian Day corresponding to this date
This implementation is not terribly efficient, since it first
converts the date to seconds and then to MJD.
- year_month_day()
Parses the date into year, month and day fields. Returns these
as an array (year, month, day).
- in_words()
Print the the date in words.
Methods