U_CNVDAT
Convert lunar and Julian dates
WSupported on Windows
|
USupported on Unix
|
VSupported on OpenVMS
|
NSupported in Synergy .NET
|
xcall U_CNVDAT(mode, year, month, day, julian)
Arguments
mode
Determines the type of conversion: (n)
1 = Convert lunar to Julian.
2 = Convert Julian to lunar.
year
The year to convert. (n)
month
The month to convert or is returned with the converted month. (n)
day
The day to convert or is returned with the converted day. (n)
julian
The Julian day or is returned with the converted Julian day. (n)
Discussion
U_CNVDAT converts lunar (month-oriented) dates to Julian and vice versa.
U_CNVDAT returns either a converted month and day in month and day or a converted Julian day in julian, depending on whether the mode is 1 or 2. The year stays the same regardless of mode.
If any of the input arguments are invalid, number 9s will be returned.
Examples
The following example places the Julian day for January 25, 1994 into julie.
xcall u_cnvdat(1, 94, 1, 25, julie)
The next example places the month and day of the 265th day of 1993 into mn and dy.
xcall u_cnvdat(2, 93, mn, dy, 265)