>  Docs Center  >  Libraries  >  ASTROLIB  >  GET_DATE
Libraries

GET_DATE

GET_DATE

Name


      GET_DATE

Purpose


      Return the (current) UTC date in CCYY-MM-DD format for FITS headers

Explanation


      This is the format required by the DATE and DATE-OBS keywords in a
      FITS header.

Calling Sequence


      GET_DATE, FITS_date, [ in_date, /OLD, /TIMETAG ]

Optional Inputs


      in_date - string (scalar or vector) containing dates in IDL
            systime() format (e.g. 'Tue Sep 25 14:56:14 2001')

Outputs


      FITS_date = A scalar character string giving the current date. Actual
              appearance of dte depends on which keywords are supplied.
     
      No Keywords supplied - dte is a 10 character string with the format
              CCYY-MM-DD where <CCYY> represents a calendar year, the
              ordinal number of a calendar month within the calendar year,
              and <DD> the ordinal number of a day within the calendar month.
      /TIMETAG set - dte is a 19 character string with the format
              CCYY-MM-DDThh:mm:ss where <hh> represents the hour in the day,
                <mm> the minutes, the seconds, and the literal 'T' the
              ISO 8601 time designator
      /OLD set - dte is an 8 character string in DD/MM/YY format

Input Keywords


      /TIMETAG - Specify the time to the nearest second in the DATE format
      /OLD - Return the DATE format formerly (pre-1997) recommended for FITS
              Note that this format is now deprecated because it uses only
              a 2 digit representation of the year.

Example


      Add the current date to the DATE keyword in a FITS header,h
   
      IDL> GET_DATE,dte
      IDL> sxaddpar, h, 'DATE', dte, 'Date header was created'

Notes


      (1) A discussion of the DATExxx syntax in FITS headers can be found in
      http://www.cv.nrao.edu/fits/documents/standards/year2000.txt
      (2) Those who wish to use need further flexibility in their date
      formats (e.g. to use TAI time) should look at Bill Thompson's time
      routines in http://sohowww.nascom.nasa.gov/solarsoft/gen/idl/time

Procedures Used


      DAYCNV - Convert Julian date to Gregorian calendar date

Revision History


      Written W. Landsman March 1991
      Major rewrite to write new DATExxx syntax W. Landsman August 1997
      Converted to IDL V5.0 W. Landsman September 1997
      Work after year 2000 even with /OLD keyword W. Landsman January 2000
      Don't need to worry about TIME_DIFF since V5.4 W. Landsman July 2001
      Assume since V5.4, remove LOCAL_DIFF keyword W. Landsman April 2006



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us