Program JULDiff

Usage

    juldiff <Julian date> < number of days>
or, alternately,
    juldiff [ yesterday | today | tomorrow ] < number of days>
or
    juldiff --help

Summary

Takes two command line arguments JDATE and KDATE, computes the (signed) number of days from JDATE to KDATE, and echoes the result to standard output (e.g., for use in scripting).

Options for the command line arguments are the following:

7-digit integer coded YYYYDDD
YESTERDAY
TODAY
TOMORROW
--HELP

If --help is an argument, writes the "USAGE" screen and exits.

Examples

Some sample executions of this program are as indicated below.

Note that in shell-scripting, the back-quote character means "the result of evaluating the enclosed command" so that the fourth example below sets shell variable foo to the result of executing the indicated juldiff command.

     % juldiff 2014029 2014031
     2

     % juldiff 2014029 2013028
     -366

     % juldiff today 2013031
     2

     % set ndays = `juldiff 2014029 2014129`
     % echo ${foo}
     100

     % juldiff --help
         %  juldiff  <Julian date 1>  <Julian date 2>
         or
         %  set ndays = `JULDIFF <juldate1>  <juldate2>

         Options for Julian dates:
              <YYYYDDD>,  e.g., 2010123
              TODAY
              YESTERDAY
              TOMORROW
              --HELP

         Output format is integer number of days.

See Also

EDSS/ Models-3 date-time manipulation routines
datshift
gregdate
greg2jul
juldate
jul2greg
julshift
timeshift

Previous: GREGDATE

Next: UTMTOOL

Up: Related Programs

To: Models-3/EDSS I/O API: The Help Pages