DateSum v1.00 build 2010280 - Simple day conversion calculator for dates
copyright (c) bytepointer.com 2020
syntax:
datesum [options] <start_date> [end_date]
[options]
-a <days> action add: add days to start_date
-s <days> action sub: subtract days from start_date
-j output julian-day result
-u output gregorian date result in US format: MM-DD-YYYY
-q quiet; output concise result
usage:
Calculate days between <start_date> and [end_date], where dates may appear
in any order. If [end_date] is omitted, perform an arithmetic action on
<start_date>. When no action is specified, the default action is to convert
between julian-day integers and human-readable gregorian-calendar dates.
Dates are specified in Y-M-D format or as positive julian-day integers+
(without hyphens). Special date keywords are additionally supported:
"today" and/or "yesterday" to reference current system time values.
Results are output in YYYY-MM-DD format by default, but this can be modified
with the -u and -j options below.
+ this tool uses an astronomical julian-day algorithm representing days since
the base date of Nov 24, 4713 (BC) thru full years up to 1,465,001 (AD).
This allows julian-days ranging from 0 to 536802342. Only whole days are
supported, thus there is no concept of time-of-day or fractional julian-
day values as found with similar algorithms.
examples:
-display the number of days since the 2016 Winter Solstice:
> datesum 2016-12-21 today
-display the julian-day for Halloween of 2020:
> datesum -j 2020-10-31
-what is 90 days from yesterday:
> datesum yesterday -a 90
-what is the date 3 weeks before Christmas of 2020:
> datesum 2020-12-25 -s 21