Date and time library [message #51731] |
Mon, 04 December 2006 09:45 |
Kenneth Bowman
Messages: 86 Registered: November 2006
|
Member |
|
|
A long time ago I needed to do date and time calculations that I could be sure were
exact to the second. So I wrote my own library that uses the JULDAY and CALDAT
functions for date calcluations, while I handled time (hours, minutes, and seconds)
myself using integer arithmetic.
Over time I have added utilities to easily compute quantities like the next
day, month, or year following a given time. It can also handle calculations with
artificial calendars that lack leap days (as some climate models do).
There are also routines to read and write dates and times as strings in
ISO 8601 format (http://www.cl.cam.ac.uk/~mgk25/iso-time.html).
If you are interested, the library, and some additional description can be found
at
http://idl.tamu.edu/downloads/time.php
Ken Bowman
|
|
|