#set TITLE = DATES
#include top

.SH NAME
dates 

.SH DATE FORMATS 
The date formats that are fully supported for storage,
conversion, arithmetic, and display are identified by the strings shown below.
.nf

mm-dd-yy    mm-dd-yyyy    mm/dd/yy    mm/dd/yyyy
mmddyy      mmddyyyy      mm.dd.yy    mm.dd.yyyy
dd-mm-yy    dd-mm-yyyy    dd/mm/yy    dd/mm/yyyy
ddmmyy      ddmmyyyy      dd.mm.yy    dd.mm.yyyy
mmm-dd-yy   mmm-dd-yyyy   mmm_dd_yy   mmm_dd_yyyy
mmm/dd/yy   mmm/dd/yyyy
dd-mmm-yy   dd-mmm-yyyy   dd_mmm_yy   dd_mmm_yyyy
dd/mmm/yy   dd/mmm/yyyy   ddmmmyy     ddmmmyyyy
yy-mm-dd    yy/mm/dd      yymmdd      yy.mm.dd
yyyy-mm-dd  yyyy/mm/dd    yyyymmdd    yyyy.mm.dd
yyyy-mmm-dd yyyy_mmm_dd   yyyymmmdd

.fi
Additional formats that can be used for presentation but not arithmetic
include: 
.nf
month_dd,_yyyy  
mon_dd,_yyyy  
dd_month,_yyyy  
dd_mon,_yyyy
www_dd_mon,_yyyy
yymm
yy/mm
yy-mm 
yyyymm
yyyy/mm
yyyy-mm
mmyy
mm/yy
mm-yy
mmyyyy
mm/yyyy
mm-yyyy
mmmdd
mmm/dd
mmm-dd
mmm_dd
mm/dd
mm-dd
mm_dd

yy, yyyy, 'yy\fR \fI(year portion only)\fC

mmm, mm, m  \fI(month portion only)\fC

dd  \fI(day portion only)\fC

www, w \fI(day of week, e.g. Thu or T)\fC

full  \fI(equivalent to \fCmonth_dd,_yyyy)\fC

wfull \fI(same as full but with weekday prepended)\fC

.fi
where:
.RS
.nf
mm = numeric month 01-12
mmm = three-character month e.g. jan
m = one character month e.g. J
mon = month abbreviation e.g. Jan
month = full month e.g. January
dd = numeric day 01-31
yy = numeric year 00-99    
yyyy = numeric year 1754-present
www = day of week, e.g. Sun
w = day of week, e.g. S
.fi
.RE
.SH NOTES

.LP
1.  Dates use an internal julian date system where 0 = January 1, 1970.
Dates as far back as 1754 AD can be handled.


.LP
2. Conversion from two-digit dates to four digit dates is
achieved using a pivot year\(em any two digit year less than
this value is assumed to be 21st century.  The pivot year 
(default = 70) is adjustable via your 
#set FILE = config.html
#set TAG = "project config file
#include link
or by using 
#set FILE = functions.html
#set TAG = "script function $setdateparms()
#include link
\0.

.LP
3. Date values may or may not be required to adhere exactly to
the date format.  For instance, if the format is \fCmm/dd/yyyy\fR
a value such as \fC03/04/2001\fR is always legal, but a value such as
\fC3/4/2001\fR may not be.
Apparently spreadsheets often export dates such as the latter.
See the \fBstrictdatelengths\fR parameter in
#set FILE = "config.html"
#set TAG = "project config file."
#include link
or by using
#set FILE = "functions.html"
#set TAG = "script function $setdateparms()."
#include link
Lenient mode is the default.
Use strict mode to ensure that malformed dates will be detected.

.LP
4. When three-character months are used, they are always entered and stored as
lower case; however the capitalization of the "mmm" can be altered to control
the way dates are presented, e.g.  Mmm = Jan, MMM = JAN.

.LP
5. "Lazy" dates are supported.  A "lazy" date is one where the
day portion is 00 to signify 'unknown day', or the month portion is
00 or "???" to signify 'unknown month', or both.  
Lazy dates may always be converted to another format. 
Lazy dates may be entered and validated only if datatype is "lazydate".
Arithmetic on lazy dates is approximate because missing month and/or day 
is converted to 01.

.LP
6. Leading zeros on a result are dropped if appropriate when generating
display-only formats.  For example, if \fCFeb 4, 1998\fR is being converted to
\fCmm/yyyy\fR it will appear as \fC2/1998\fR.

.LP
7. Localization of date presentation parameters may be done in your
#set FILE = config.html
#set TAG = "project config file"
#include link

#include bottom
