Program JULDATE

Usage

    TIMEDIFF <YYYYDDD>.<HHMMSS> <HHMMSS>
or
    timediff --help

Summary

Compute the difference of two date&time values formatted YYYYDDD.HHMMSS inj seconds, 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.

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 third example below sets shell variable foo to the result of executing the indicated TIMEDIFF command.

     % timediff 2014029.120000 2014030.063000
     183000
    

     % timediff 2014031.120000 2014029.120000
     -480000
     

     % @ nhours = 365 * 240000
     % set foo  = `timediff 2014029 $nhours`
     % echo $foo
     2015029

     % timediff --help
        DESCRIPTION:  difference two datetime values in seconds.       

        USAGE: TIMEDIFF <YYYYDDD.HHMMSS> <YYYYDDD.HHMMSS>                
               TIMEDIFF --help                                           
        or (using back-quotes)                                           
        %  set <var> = `timediff <juldate1.hhmmss> <juldate2.hhmmss>`    

        EXAMPLE:                                                         
           % set foo  = `TIMEDIFF 2019123.120000 2019124.130000          
             [${foo}  will be    9000 (= 25 hours*3600 sec/hour)]        

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