Package nom.tam.fits

Class FitsDate

java.lang.Object
nom.tam.fits.FitsDate

public class FitsDate extends Object
Fits date object parsed from the different type of date combinations
  • Constructor Details

    • FitsDate

      public FitsDate(String dStr) throws FitsException
      Convert a FITS date string to a Java Date object.
      Parameters:
      dStr - the FITS date
      Throws:
      FitsException - if dStr does not contain a valid FITS date.
  • Method Details

    • getFitsDateString

      public static String getFitsDateString()
      Returns:
      the current date in FITS date format
    • getFitsDateString

      public static String getFitsDateString(Date epoch)
      Parameters:
      epoch - The epoch to be converted to FITS format.
      Returns:
      a created FITS format date string Java Date object.
    • getFitsDateString

      public static String getFitsDateString(Date epoch, boolean timeOfDay)
      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

      public Date toDate()
      Get a Java Date object corresponding to this FITS date.
      Returns:
      The Java Date object.
    • toString

      public String toString()
      Overrides:
      toString in class Object