Go to the first, previous, next, last section, table of contents.


The next two functions convert between Julian dates and ASCII strings. Julian dates as defined by astronomers begin at noon GMT; these begin at midnight local time.

datstr

char *datstr(DB_Date date)

Return:

(char *)
pointer to a string that represents the date

This function converts the Julian date represented by date into an ASCII string in the form DD/MM/YYYY.

strdat

DB_Date strdat(char *string)

Return:

(DB_Date)
Julian date corresponding to the argument

This function converts string into a Julian date. The argument should be in the format used by datstr; if string is improperly formatted, strdat returns zero. Note that dates such as `15/3/89' refer to the first century A.D., not the twentieth. For example, the interval in days between the events commemorated by the French and American national holidays is strdat("14/7/1789") -- strdat("4/7/1776").


Go to the first, previous, next, last section, table of contents.



George B. Moody (george@hstbme.mit.edu)