[comp.text.tex] Handling dates in TeX

duncanb@ibmpcug.co.uk (D G Booth) (03/11/91)

Does anybody have any LaTeX (or plain TeX, I'm not choosy) macros to
handle dates. Specifically, I want some way of taking a date entered
in some suitable format and doing numeric comparisons on it.
 
At present I have written macros which insist on a DD/MM/YY format
(or DD/MM/YYYY) and reformat that either as DD/MM/YY or Month dd,
YYYY. I can easily see how to do a straight date1>date2 comparison,
but I would like to be able to do expand this to look for dates
greater than 7 days ago, or greater than one month. Also, I would
like to be able to handle dates entered in a more flexible format
e.g. 11Mar91, 11th March 91, etc. since 11/3/91 format I handle at
present has the disadvantage that Americans can't read it.
(and no - I dont really want to type in my dates in ISO format
YY/MM/DD either).
 
Can anyone help me with a) macros that convert dates to a standard
format. b) a macro to convert a date into a number of days since some
preset date.
 
The background to this is that I have written a LaTeX style file
which defines an environment `bug'. I can maintain a list of bug
reports, and fairly easily print out the complete bug list or
summaries of outstanding bugs. I want to add the facility to select
bugs outstanding for more than 30 days, or bugs fixed recently, and I
dont really want to reinvent the wheel.
 
Duncan Booth
-- 
Automatic Disclaimer:
The views expressed above are those of the author alone and may not
represent the views of the IBM PC User Group.
-- 
Duncan Booth, RCP Ltd.                    Didcot, Oxon, UK
duncanb@ibmpcug.co.uk                     Bix: jrichards