USAGE
JDC { -j | -d | -D } options date
or
proc | JDC { -j | -d | -D } -i options


PURPOSE: Convert Julian date to Kalendar or vice versa

OPTIONS:
Compulsory:

 -j[i][o[y]][,] x - Convert Julian date x to kalendar form.
                 The comma form causes output comma-separated without blanks

                 In the -ji case, input is a floating-point year.
                 In the -jio case, output as a Julian date.
                 In the -joy case, output as a floating-point year

 -d[y|h] yyyy mm dd [hh [mi [se [f]]]]
               - convert kalendar to Julian (RJD)
.............y - floating-point year
.............h - floating-point hour
                 mm dd hh mi se  may each go over-range. E.g.
                 2009 13 10  will translate to 2010 01 10

 -D[y|h] yyyy mm dd [hh [mi [se [f]]]]
               - Output orthodox date (rectified for over-range values)

 -d[y|h][c][date]
               - In file mode, output relative this date.
             c - cut at this date.
                 Date must be coded without blanks, comma-separated.
                 Date must be year,month,day.
Optional:

 -i[c1,c2]     - read from stdin (file mode). Default: command line.
                 The time field is extracted from an input line and processed.
                 The part of the input line, beyond position w, is passed through
                 if the -F'(code),w' option is given; however, if c1,c2 is given
                 the input string from position c1 through c2 is appended to the
                 converted date. (Default: no pass-through of text.)

 -Kp           - position where the time part is written on the output line.
                 Example:
                   JDC -j  -m -K12 '55300 abcd'
                   55300 abcd  2010 04 14
                   JDC -j -m  55300
                   2010 04 14
 
 -z
n           - Time Zone

 -F'(fmt),w'   - input format for date and w total width of date field.
                 Command-line mode: Julian date is read format-free (*) by default.
                    For yyyy mm dd [hh mm ss] default format is '(i4,5i3)';
                 File mode: Default format for Julian: '(F11.0)' (always floating-point!)
                    Default for kalendar '(i4,5i3)'
             w - width of time field, effective with file input only.
                 Example (command-line):
                  JDC -j -m -K12 -F'(f5.0),5' '55300 abcd'
                  55300 abcd  2010 04 14

                 Examples file input:
                  echo '55300 abcd' | JDC -j -m -K12 -F'(f5.0),12' -i
                  55300 abcd  2010 04 14

                  echo '55300 abcd' | JDC -j -m -K12 -F'(f5.0),5' -i
                  55300       2010 04 14

                  echo '55300 abcd' | JDC -j -m -K12 -F'(f5.0),8' -i
                  55300 ab    2010 04 14

 -n[i]p........- output month in character form.
.............i - capitalise initial (Jan Feb etc.)
                 Specify position p in time part of output string [6]
 -N            - like -n, upper case however.
                 Example:
                 echo '55300 abcd' | JDC -j -m -F'(f5.0),12' -i6,12
-K12 -k3 -N
                 55300 abcd  2010 APR 14 00 00 00  abcd

 -m -r         - modified resp. reduced Julian.

 -x            - output long, exact Julian date when converting from kalendar.

 -s[h]         - kalendar form is yyyy mm dd s with floating-point seconds (hours)

 -kd           - 0 <= d <= 4 specifies hh mi se f part depth.

 -A[h|m|s]j -S[h|m|s]j - Add, or subtract j days to/from Julian date.
.............h - value j is in hours.
.............m - value j is in minutes.
.............s - value j is in seconds.

 -ffmt        - fmt is Fortran format code for output. Parentheses are automatically added.
                There are quite good
  and adaptive defaults.

 -,            - write comma-separated output.
 --            - write dash-separated output.
 -:            - write dash-and-colon-separated output.
                 Example
                  JDC -D  -k2 -: 2012 01 06
                 2012-01-06 00:00

 -y2k[{i|o}][y]  or
 -YY
[{i|o}][y]

               - On input, add 1900 to the year if greater than 50, else 2000,
                 on output, subtract...

             y - Specify a year 0 <= y <= 99 for the break (default y=50)

 -Lb,e         - Loop from b to e (integers) with the increment specified under -A
                 Example:
                  JDC -D -k3 -Am1 -L0,3 2012 01 06
                 2012 01 06 00 00 00
                 2012 01 06 00 01 00
                 2012 01 06 00 02 00
                 2012 01 06 00 03 00

NOTE:
If the date part on the command line is empty, the program will try input from <stdin>

EXAMPLE:
Convert calendar dates in a time series file to MJD
>2003 01 01 00 data...................
>2003 01 01 01 data...................
cat file | JDC -i -d -k1 -F'(I4,3i3)',13 -m -f'(f10.3)'
gives
>52640.000  data...................
>52640.042  data...................

We have more examples

.bye