julstd, stdjul, ymdstd, stdymd, todaysdate, todaysyear - Date conversion functions

SYNOPSIS

int julstd(year, day)
int year, day;

void stdjul(date, year, day)
int date;
int *year, *day;

int ymdstd(year, month, day)
int year, month, day;

void stdymd(date, year, month, day)
int date;
int *year, *month, *day;

int todaysdate()

int todaysyear()

DESCRIPTION

These routines convert to and from TeraScan standard date units, namely days since January 1, 1900, inclusive.

julstd converts year and julian day to standard date units.

stdjul converts date in standard units to year and julian day.

ymdstd converts year, month and day to standard date units.

stdymd converts date in standard units to year, month, and day.

todaysdate returns today's date (GMT) in standard date units.

todaysyear returns today's year (GMT), e.g., 1992.

RETURN VALUES

julstd, ymdstd, and todaysdate return date in standard units. todaysyear returns a 4-digit year. stdjul and stdymd have no return values.

ERRORS

julstd and ymdstd return 0 for invalid inputs, such as year < 1900, month < 1, month < 12, and day < 1.

If date < 0, stdjul and stdymd set year = month = day = 0.

FILES

None

SEE ALSO

datestr


Last Update: $Date: 1999/05/10 20:56:31 $