home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 2 / ctrom_ii_b.zip / ctrom_ii_b / PROGRAM / C / JULCAL10 / README < prev    next >
Text File  |  1992-12-22  |  928b  |  20 lines

  1.  
  2. The standard C library routines for dates tend to fail before Jan 1,
  3. 1970.  These routines let you do date calculations back to 4713 B.C. 
  4. using an ordinary struct tm.
  5.  
  6. juldn() calculates for a given date the Julian date (days since Jan 1
  7. 4713 B.C.).  julcd() calculates the date (either Gregorian or Julian
  8. calendar, with an arbitrary transition date) for a given Julian date.
  9. In either case, the date is supplied in a struct tm.
  10.  
  11. Like mktime(), juldn() has the side effects of normalizing the values
  12. of the fields tm_mday and tm_mon if they are outside their normal
  13. ranges, and of setting the fields tm_wday (day of week) and tm_yday
  14. (day of year).  However, mktime() is one of the functions that usually 
  15. fails before 1970, and the implementations I tested didn't normalize
  16. correctly, sometimes making spectacular errors (notably Borland's).
  17.  
  18.                              - Jim Van Zandt <jrv@mitre.org>
  19.  
  20.