nom.tam.fits
Class FitsDate

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

public class FitsDate
extends java.lang.Object


Constructor Summary
FitsDate(java.lang.String dStr)
          Convert a FITS date string to a Java Date object.
 
Method Summary
static void autotest()
           
static java.lang.String getFitsDateString()
          Return the current date in FITS date format
static java.lang.String getFitsDateString(java.util.Date epoch)
          Create FITS format date string Java Date object.
static java.lang.String getFitsDateString(java.util.Date epoch, boolean timeOfDay)
          Create FITS format date string.
static void main(java.lang.String[] args)
           
static void testArgs(java.lang.String[] args)
           
 java.util.Date toDate()
           
 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

toDate

public java.util.Date toDate()

getFitsDateString

public static java.lang.String getFitsDateString()
Return the current date in FITS date format


getFitsDateString

public static java.lang.String getFitsDateString(java.util.Date epoch)
Create FITS format date string Java Date object.

Parameters:
epoch - The epoch to be converted to FITS format.

getFitsDateString

public static java.lang.String getFitsDateString(java.util.Date epoch,
                                                 boolean timeOfDay)
Create FITS format date string. Note that the date is not rounded.

Parameters:
epoch - The epoch to be converted to FITS format.
timeOfDay - Should time of day information be included?

toString

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

testArgs

public static void testArgs(java.lang.String[] args)

autotest

public static void autotest()

main

public static void main(java.lang.String[] args)