julian - convert Gregorian dates
SYNOPSIS
julian [ -c|-u|-e ][ -fc ] [ -Dn ] column [ ... ] < tableorlist
DESCRIPTION
julian
converts Gregorian dates
from the named columns to Julian format,
in order to perform arithmetic on dates or to
change the date format.
By default, the input format of the date is
[yy]yymmdd.
If the century is not included in the date,
then the current century is assumed and computed
as part of the Julian conversion.
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
-------- ------- ----- ------ ----------------------------
91 11 22 101.0 25000 cash from loan
91-12-02 211.1 25000 loan number #378-14 BA
91/12/23 150.1 10000 test equipment from Zarkoff
91.12.24 101.0 5000 cash payment
19920110 211.2 5000 payable to Zarkoff Equipment
19920305 130.0 30000 inventory - parts from CCPSC
$ julian Date < journal
Date Account Debit Credit Description
------- ------- ----- ------ ----------------------------
2448583 101.0 25000 cash from loan
2448593 211.1 25000 loan number #378-14 BA
2448614 150.1 10000 test equipment from Zarkoff
2448615 101.0 5000 cash payment
2448632 211.2 5000 payable to Zarkoff Equipment
2448687 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