Guardian Procedure Calls Reference Manual

INTERPRETJULIANDAYNO Procedure
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
Example
Related Programming Manual
Summary
The INTERPRETJULIANDAYNO procedure converts a Julian day number to the year, month, and
day.
The Julian calendar is the integral number of days since January 1, 4713 B.C. The formal definition
of the Julian day states that it starts at 12:00 (noon), Greenwich mean time (GMT).
Syntax for C Programmers
#include <cextdecs(INTERPRETJULIANDAYNO)>
void INTERPRETJULIANDAYNO ( __int32_t julian-day-num
,short _near *year
,short _near *month
,short _near *day );
CEXTDECS (through the included file TNSINTH) defines 32-bit values as the typedef
__int32_t, which for TNS and TNS/R compiles is defined as long and for TNS/E compiles
is defined as int.
Syntax for TAL Programmers
CALL INTERPRETJULIANDAYNO ( julian-day-num ! i
,year ! o
,month ! o
,day ); ! o
Parameters
julian-day-num
input
INT(32):value
is the Julian day number to be converted. The julian-day-num must not be greater than
3,182,395, else it returns an -1 for the year parameter.
year
output
INT:ref:1
returns the Gregorian year (for example, 1984, 1985, and so forth).
month
output
INT:ref:1
returns the Gregorian month (1-12).
732 Guardian Procedure Calls (H-K)