"Fossies" - the Fresh Open Source Software Archive

Member "dateutils-0.4.6/src/dadd.yuck" (19 Mar 2019, 3289 Bytes) of package /linux/privat/dateutils-0.4.6.tar.xz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "dadd.yuck": 0.4.5_vs_0.4.6.

    1 Usage: dateadd [OPTION]... [DATE/TIME] [DURATION]
    2 
    3 Add DURATION to DATE/TIME and print the result.
    4 If DATE/TIME is omitted but DURATION is given, read a list of DATE/TIMEs from
    5 stdin.
    6 If DURATION is omitted but DATE/TIME is given, read a list of DURATIONs from
    7 stdin.
    8 
    9 Durations are specified as nY, nMO, nW, or nD for years, months, weeks, or days
   10 respectively, or nH, nM, nS for hours, minutes, and seconds, where N is a
   11 (possibly negative) number.  The unit symbols can be written lower-case as well
   12 (y, mo, w, d, h, m, s) and the unit symbol `d' can be omitted.
   13 
   14 Note that duration addition is not commutative!
   15   2000-03-30 +1mo +1d -> 2000-05-01
   16   2000-03-30 +1d +1mo -> 2000-04-30
   17 
   18 
   19   -h, --help                 Print help and exit
   20   -V, --version              Print version and exit
   21   -q, --quiet                Suppress message about date/time and duration
   22                              parser errors and fix-ups.
   23                              The default is to print a warning or the
   24                              fixed up value and return error code 2.
   25   -f, --format=STRING        Output format.  This can either be a specifier
   26                                string (similar to strftime()'s FMT) or the name
   27                                of a calendar.
   28   -i, --input-format=STRING...  Input format, can be used multiple times.
   29                                Each date/time will be passed to the input
   30                                format parsers in the order they are given, if a
   31                                date/time can be read successfully with a given
   32                                input format specifier string, that value will
   33                                be used.
   34   -b, --base=DT              For underspecified input use DT as a fallback to
   35                              fill in missing fields.  Also used for ambiguous
   36                              format specifiers to position their range on the
   37                              absolute time line.
   38                              Must be a date/time in ISO8601 format.
   39                              If omitted defaults to the current date/time.
   40   -e, --backslash-escapes    Enable interpretation of backslash escapes in the
   41                                output and input format specifier strings.
   42   -S, --sed-mode             Copy parts from the input before and after a
   43                                matching date/time.
   44                                Note that all occurrences of date/times within a
   45                                line will be processed.
   46   -E, --empty-mode           Empty lines that cannot be parsed.
   47       --locale=LOCALE        Format results according to LOCALE, this would only
   48                              affect month and weekday names.
   49       --from-locale=LOCALE   Interpret dates on stdin or the command line as
   50                              coming from the locale LOCALE, this would only
   51                              affect month and weekday names as input formats
   52                              have to be specified explicitly.
   53       --from-zone=ZONE       Interpret dates on stdin or the command line as
   54                                coming from the time zone ZONE.
   55   -z, --zone=ZONE            Convert dates printed on stdout to time zone ZONE,
   56                                default: UTC.