Package nom.tam.fits

Class FitsDate


  • public class FitsDate
    extends java.lang.Object
    Fits date object parsed from the different type of date combinations
    • Constructor Summary

      Constructors 
      Constructor Description
      FitsDate​(java.lang.String dStr)
      Convert a FITS date string to a Java Date object.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getFitsDateString()  
      static java.lang.String getFitsDateString​(java.util.Date epoch)  
      static java.lang.String getFitsDateString​(java.util.Date epoch, boolean timeOfDay)  
      java.util.Date toDate()
      Get a Java Date object corresponding to this FITS date.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • FitsDate

        public FitsDate​(java.lang.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 Detail

      • getFitsDateString

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

        public static java.lang.String getFitsDateString​(java.util.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 java.lang.String getFitsDateString​(java.util.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 java.util.Date toDate()
        Get a Java Date object corresponding to this FITS date.
        Returns:
        The Java Date object.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object