[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Waldhäuser Str. 64, D-72076 Tübingen, Germany
[Uni logo]


DATE_CONV Source code in date_conv.pro

DATE_CONV

Name
     DATE_CONV
Purpose
     Procedure to perform conversion of dates to one of three possible formats.
Explanation
     The following date formats are allowed
       format 1: real*8 scalar encoded as:
               year*1000 + day + hour/24. + min/24./60 + sec/24./60/60
               where day is the day of year (1 to 366)
       format 2: Vector encoded as:
               date[0] = year (eg. 1987)
               date[1] = day of year (1 to 366)
               date[2] = hour
               date[3] = minute
               date[4] = second
       format 3: string (ascii text) encoded as
               DD-MON-YEAR HH:MM:SS.SS
               (eg.  14-JUL-1987 15:25:44.23)
            OR
               YYYY-MM-DD HH:MM:SS.SS  (ISO standard)
               (eg.  1987-07-14 15:25:44.23 or 1987-07-14T15:25:44.23)
       format 4: three element vector giving spacecraft time words
       from a Hubble Space Telescope (HST) telemetry packet.
Calling Sequence
       results = DATE_CONV( DATE, TYPE )
Input Parameters
       DATE - input date in one of the three possible formats.
       TYPE - type of output format desired.  If not supplied then
               format 3 (real*8 scalar) is used.
                       valid values:
                       'REAL'  - format 1
                       'VECTOR' - format 2
                       'STRING' - format 3
                       'FITS' - YYYY-MM-DDTHH:MM:SS.SS'
               TYPE can be abbreviated to the single character strings 'R',
               'V', 'S' and 'F'.
               Nobody wants to convert TO spacecraft time (I hope!)
Output Parameters
       The converted date is returned as the function value.
Note
      Prior to Oct 1998, the returned real*8 date (format 1) was given as
      (year-1900)*1000 + day + hour/24. + min/24./60 + sec/24./60/60
      This output is ambiguous with respect to the year 2000.   Note that the
      current version of DATE_CONV() may not be backwards compatible with
      versions prior to Oct 1998.
Revision History
      version 1  D. Lindler  July, 1987
      adapted for IDL version 2  J. Isensee  May, 1990
      Made year 2000 compliant; allow ISO format input  jls/acc Oct 1998
      DJL/ACC Jan 1998, Modified to work with dates such as 6-JAN-1996 where
               day of month has only one digit.
      DJL, Nov. 2000, Added input/output format YYYY-MM-DDTHH:MM:SS.SS

Last modified by pro2html on 2001 April 26 at 03:10 UTC

[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]

Jörn Wilms (wilms@astro.uni-tuebingen.de)
Updated automatically