Tabular data handling toolkit  


Manual page for DATES(TDH)

dates

DATE FORMATS

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

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

Additional formats that can be used for presentation but not arithmetic include:
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 (year portion only)

mmm, mm, m  (month portion only)

dd  (day portion only)

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

full  (equivalent to month_dd,_yyyy)

wfull (same as full but with weekday prepended)

where:
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 1800-up
www = day of week, e.g. Sun
w = day of week, e.g. S

NOTES

1. Conversion from two-digit dates to four digit dates is achieved using a pivot year-- any two digit year less than this value is assumed to be 21st century. The pivot year (default = 77) is adjustable via your project config file or by using script function $setdateparms() .

2. Date values may or may not be required to adhere exactly to the date format. For instance, if the format is mm/dd/yyyy a value such as 03/04/2001 is always legal, but a value such as 3/4/2001 may not be. Apparently spreadsheets often export dates such as the latter. See the strictdatelengths parameter in project config file. or by using script function $setdateparms(). By default, midriff operates in lenient mode. Use strict mode to ensure that malformed dates will be detected.

3. 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.

4. "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.

5. Leading zeros on a result are dropped if appropriate when generating display-only formats. For example, if Feb 4, 1998 is being converted to mm/yyyy it will appear as 2/1998.

6. Localization of date presentation parameters may be done in your project config file


Tabular data handling toolkit 
Copyright Steve Grubb


Markup created by unroff 1.0,    September 19, 2003.