Program JULSHIFT

Usage

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

Summary

Increment indicated Julian date by specified number of days and echo the result to standard output (e.g., for use in scripting).

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

Date should be one of the following:

7-digit integer coded YYYYDDD, e.g., 2010123 for year 2010 day 123
YESTERDAY
TODAY
TOMORROW

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 julshift command.

     % julshift 2014029 3
     2014032

     % julshift 2014029 -365
     2013029

     % julshift today 2
     2013031

     % set ndays = `julshift 2014029 300`
     % echo $foo
     2014329

     % julshift --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
juldiff
julshift
timeshift

Previous: GREGDATE

Next: UTMTOOL

Up: Related Programs

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