<< prev file | next file >>    view single page | view frames    summary: fields | routine    details: routine

Calendar/

caldat.pro

Return the calendar date and time given julian date. This is the inverse of the function julday. 3 calendars are available according to the value of key_caltype (variable of the common file cm_4cal): 'greg', '360d', 'noleap'

topcaldat Calendar

caldat, julian, month, day, year, hour, minute, second, NDAYSPM=integer

Parameters

julian        in required type: long integer or double-precision floating-point

contains the Julian Day Number (which begins at noon) of the specified calendar date.

month        out type: longword integer

Number of the desired month (1 = January, ..., 12 = December).

day        out type: longword integer

Number of day of the month.

year        out type: longword integer

Number of the desired year.

hour        out type: longword integer

Hour of the day

minute        out type: longword integer

Minute of the day

second        out type: double-precision floating-point

Second (and fractions) of the day.

Keywords

NDAYSPM        type: integer default: 30

To use a calendar with fixed number of days per month. see also the use of key_caltype (variable of the common file cm_4cal)

Version history

Version

$Id: caldat.pro 371 2008-08-07 09:32:02Z pinsard $

History

Translated from "Numerical Recipes in C", by William H. Press, Brian P. Flannery, Saul A. Teukolsky, and William T. Vetterling. Cambridge University Press, 1988 (second printing). DMS, July 1992. DMS, April 1996, Added HOUR, MINUTE and SECOND keyword AB, 7 December 1997, Generalized to handle array input. Eric Guilyardi, June 1999 Added key_work ndayspm for fixed number of days per months AB, 3 January 2000, Make seconds output as DOUBLE in array output. Sebastien Masson, May 2006, add different calendar with key_caltype (variable of the common file cm_4cal)

Known issues

Restrictions

Accuracy using IEEE double precision numbers is approximately 1/10000th of a second.

Other attributes

Uses routines

Statistics

McCabe cyclic 21
McCabe essential 1
McCabe modular design 1
Produced by IDLdoc 2.0.