Package nom.tam.fits
Class FitsDate
java.lang.Object
nom.tam.fits.FitsDate
- All Implemented Interfaces:
Comparable<FitsDate>
ISO timestamp support for FITS headers. Such timestamps are used with
DATE
style header keywords, such
as DATE-OBS
or DATE-END
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
boolean
static String
Returns the FITS date string for the current date and time.static String
getFitsDateString
(Date epoch) Returns the FITS date string for a specific date and timestatic String
getFitsDateString
(Date epoch, boolean timeOfDay) Returns the FITS date string, with or without the time component, for a specific date and time.int
hashCode()
toDate()
Get a Java Date object corresponding to this FITS date.toString()
-
Constructor Details
-
FitsDate
Convert a FITS date string to a JavaDate
object.- Parameters:
dStr
- the FITS date- Throws:
FitsException
- ifdStr
does not contain a valid FITS date.
-
-
Method Details
-
getFitsDateString
Returns the FITS date string for the current date and time.- Returns:
- the current date in FITS date format
- See Also:
-
getFitsDateString
Returns the FITS date string for a specific date and time- Parameters:
epoch
- The epoch to be converted to FITS format.- Returns:
- a created FITS format date string Java Date object.
- See Also:
-
getFitsDateString
Returns the FITS date string, with or without the time component, for a specific date and time.- Parameters:
epoch
- The epoch to be converted to FITS format.timeOfDay
- Whether the time of day information shouldd be included- Returns:
- a created FITS format date string. Note that the date is not rounded.
- See Also:
-
toDate
Get a Java Date object corresponding to this FITS date.- Returns:
- The Java Date object.
-
toString
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareTo
in interfaceComparable<FitsDate>
-