Previous SAXO Documentation Assistant: Overview Next

Calendar/

date2jul.pro

gives Julian day equivalent of a date given in yyyymmdd format This is the inverse of the function jul2date.

date2jul Calendar

result = date2jul(date, GRADS=GRADS, MONTH=MONTH, DAY=DAY, YEAR=YEAR, HOUR=HOUR, MINUTE=MINUTE, SECOND=SECOND)

Return value

Julian day with the same format (long or double) as the input parameter

Parameters

date        in required type: long or double, scalar or array

longword integer with yyyymmdd format or double-precision floating-point with yyyymmdd.xx where xx is the fraction of the day (xx=0 at 0am and 5 at 12am)

Keywords

GRADS       

if 1 <= year <= 49 --> year = 2000 + year if 50 <= year <= 99 --> year = 1900 + year

MONTH       

Set this keyword equal to a named variable that will receive a longword integer or longword integer array representing the number of the desired month (1 = January, ..., 12 = December).

DAY       

Set this keyword equal to a named variable that will receive a longword integer or longword integer array representing the number of the day of the month (1-31).

YEAR       

Set this keyword equal to a named variable that will receive a longword integer or longword integer array representing the number of the desired year (e.g., 1994).

HOUR       

Set this keyword equal to a named variable that will receive a longword integer or longword integer array representing the number of the hour of the day (0-23).

MINUTE       

Set this keyword equal to a named variable that will receive a longword integer or longword integer array representing the number of the minute of the hour (0-59).

SECOND       

Set this keyword equal to a named variable that will receive a double-precision floating-point value or a double-precision floating-point array representing the number of the second of the minute (0-59).

Examples


 IDL> jday = juldate(19930124)
 IDL> print, date2jul(19931205) EQ julday(12,5,1993)
       1
 IDL> print, date2jul(931205,/grads) EQ julday(12,5,1993)
       1
 IDL> print, date2jul(19931205.5d) EQ julday(12,5,1993,12,0,0)
       1
 IDL> print, date2jul(19931205.0d) EQ julday(12,5,1993,0,0,0)
       1

    

Version history

Version

$Id: date2jul.pro 329 2007-12-20 17:12:44Z smasson $

History

Sebastien Masson (smasson@lodyc.jussieu.fr) June 2005

Known issues

Restrictions

Input param must be longword integer or double-precision floating-point

 


  Produced by IDLdoc 2.0.