Package nom.tam.fits
Class FitsDate
java.lang.Object
nom.tam.fits.FitsDate
Fits date object parsed from the different type of date combinations
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringstatic StringgetFitsDateString(Date epoch) static StringgetFitsDateString(Date epoch, boolean timeOfDay) toDate()Get a Java Date object corresponding to this FITS date.toString()
-
Constructor Details
-
FitsDate
Convert a FITS date string to a JavaDateobject.- Parameters:
dStr- the FITS date- Throws:
FitsException- ifdStrdoes not contain a valid FITS date.
-
-
Method Details
-
getFitsDateString
- Returns:
- the current date in FITS date format
-
getFitsDateString
- Parameters:
epoch- The epoch to be converted to FITS format.- Returns:
- a created FITS format date string Java Date object.
-
getFitsDateString
- Parameters:
epoch- The epoch to be converted to FITS format.timeOfDay- Should time of day information be included?- Returns:
- a created FITS format date string. Note that the date is not rounded.
-
toDate
Get a Java Date object corresponding to this FITS date.- Returns:
- The Java Date object.
-
toString
-