wday - convert dates to day-of-week
SYNOPSIS
wday [ -c|-u|-e ][ -fc ] [ -Dn ] column [ ... ] < tableorlist
DESCRIPTION
wday
converts dates
format) from the named columns to integers in the range 0-9,
where 0 is Sunday and 6 is Saturday.
The default input date format is
[yy]yymmdd.
OPTIONS
- -c
- input date format is computer [yy]yymmdd (default).
Date elements may be separated by a non-numeric delimiter,
ie., 1999-10-26.
- -u
- input date format is U.S. (mmddyy[yy]).
Date elements may be separated by a non-numeric delimiter,
ie., 6/11/50.
- -e
- input date format is European (ddmmyy[yy]).
Date elements may be separated by a non-numeric delimiter,
ie., 31.10.98.
- -fc
- use c (instead of TAB) as the input field
separation character.
- -Dn
- turn on debugging at level n, or 1 if n
is not specified.
EXAMPLE
$ cat journal
Date Account Debit Credit Description
------ ------- ----- ------ ----------------------------
11/22/94 101.0 25000 cash from loan
12/02/94 211.1 25000 loan number #378-14 BA
12/23/94 150.1 10000 test equipment from Zarkoff
12/24/94 101.0 5000 cash payment
1/10/95 211.2 5000 payable to Zarkoff Equipment
3/5/95 130.0 30000 inventory - parts from CCPSC
$ wday -u Date < journal
Date Account Debit Credit Description
------ ------- ----- ------ -----------
2 101.0 25000 cash from loan
5 211.1 25000 loan number #378-14 BA
5 150.1 10000 test equipment from Zarkoff
6 101.0 5000 cash payment
2 211.2 5000 payable to Zarkoff Equipment
0 130.0 30000 inventory - parts from CCPSC
Y2K NOTE:
After 1999, all 2-digit year dates between 00 and 69
are assumed to be in the 21st century.
SEE ALSO