"Fossies" - the Fresh Open Source Software Archive

Member "dateutils-0.4.6/info/dateseq.manu" (19 Mar 2019, 11998 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 "dateseq.manu": 0.4.5_vs_0.4.6.

    1 .\" auto generated by yuck -*- nroff -*-
    2 .TH DATESEQ "1" "March 2019" "dateutils 0.4.6" "User Commands"
    3 .SH NAME
    4 dateseq - Generate a sequence of date/times from FIRST to LAST, optionally in steps of
    5 .SH SYNOPSIS
    6 .B dateseq
    7 [\fIOPTION\fR]... 
    8 FIRST \fI\fR[\fI\fR[\fIINCREMENT\fR] \fILAST\fR]
    9 .SH DESCRIPTION
   10 Generate a sequence of date/times from FIRST to LAST, optionally in steps of
   11 INCREMENT (which defaults to `1d').
   12 
   13 If LAST is omitted it defaults to `now' if FIRST is a date/time, or `today' if
   14 FIRST is a date, or `time' if FIRST is a time.
   15 
   16 The values of FIRST and LAST are always inclusive and no date/times before
   17 FIRST and no date/times after LAST will be printed.
   18 
   19 Negative INCREMENTs must be given, i.e. if FIRST is newer than LAST.
   20 
   21 .PP
   22 
   23 Recognized \fIOPTION\fRs:
   24 .TP
   25 .B   \fB-h\fR, \fB--help
   26 Print help and exit
   27 .TP
   28 .B   \fB-V\fR, \fB--version
   29 Print version and exit
   30 .TP
   31 .B   \fB-q\fR, \fB--quiet
   32 Suppress message about date/time and duration
   33 parser errors and fix-ups.
   34 The default is to print a warning or the
   35 fixed up value and return error code 2.
   36 .TP
   37 .B   \fB-f\fR, \fB--format\fR=\fISTRING
   38 Output format.  This can either be a specifier
   39 string (similar to strftime()'s FMT) or the name
   40 of a calendar.
   41 .TP
   42 .B   \fB-i\fR, \fB--input-format\fR=\fISTRING\fR...
   43 Input format, can be used multiple times.
   44 Each date/time will be passed to the input
   45 format parsers in the order they are given, if a
   46 date/time can be read successfully with a given
   47 input format specifier string, that value will
   48 be used.
   49 .TP
   50 .B   \fB-b\fR, \fB--base\fR=\fIDT
   51 For underspecified input use DT as a fallback to
   52 fill in missing fields.  Also used for ambiguous
   53 format specifiers to position their range on the
   54 absolute time line.
   55 Must be a date/time in ISO8601 format.
   56 If omitted defaults to the current date/time.
   57 .TP
   58 .B   \fB-e\fR, \fB--backslash-escapes
   59 Enable interpretation of backslash escapes in the
   60 output and input format specifier strings.
   61 .TP
   62 .B       \fB--locale\fR=\fILOCALE
   63 Format results according to LOCALE, this would only
   64 affect month and weekday names.
   65 .TP
   66 .B       \fB--from-locale\fR=\fILOCALE
   67 Interpret dates on stdin or the command line as
   68 coming from the locale LOCALE, this would only
   69 affect month and weekday names as input formats
   70 have to be specified explicitly.
   71 .TP
   72 .B   \fB-s\fR, \fB--skip\fR=\fISTRING\fR...
   73 Skip weekdays specified by STRING.
   74 STRING can be a single weekday (Mon, Tue, etc.),
   75 and to skip several days the --skip option can
   76 be used multiple times.
   77 STRING can also be a comma-separated list of
   78 weekday names, or `ss' to skip weekends
   79 (sat+sun) altogether.
   80 STRING can also contain date ranges like `mo-we'
   81 for monday to wednesday.
   82 .TP
   83 .B       \fB--alt-inc\fR=\fISTRING
   84 Alternative increment to use when a date is hit
   85 that is skipped as per --skip.
   86 This increment will be applied until a
   87 non-skipped date is reached.
   88 The special case `0' (default) deactivates
   89 alternative incrementing.  A useful value could
   90 be `1d' for increasing sequences and `-1d' for
   91 decreasing sequences, so if a skipped date is
   92 encountered the next non-skipped date
   93 after/before will be used.
   94 .TP
   95 .B       \fB--compute-from-last
   96 Compute a start value from LAST using INCREMENT.
   97 This option has an effect only when INCREMENT is
   98 not a divisor of the duration between FIRST and
   99 LAST.  In such case, an alternative FIRST will
  100 be computed by consecutively subtracting
  101 INCREMENT from LAST until FIRST is hit or
  102 crossed.
  103 .SH FORMAT SPECS
  104 .PP
  105 Format specs in dateutils are similar to posix' strftime().
  106 .PP
  107 However, due to a broader range of supported calendars dateutils must
  108 employ different rules.
  109 .PP
  110 Date specs:
  111 .nf
  112   %a  The abbreviated weekday name
  113   %A  The full weekday name
  114   %_a The weekday name shortened to a single character (MTWRFAS)
  115   %b  The abbreviated month name
  116   %B  The full month name
  117   %_b The month name shortened to a single character (FGHJKMNQUVXZ)
  118   %c  The count of the weekday within the month (range 00 to 05)
  119   %C  The count of the weekday within the year (range 00 to 53)
  120   %d  The day of the month, 2 digits (range 00 to 31)
  121   %D  The day of the year, 3 digits (range 000 to 366)
  122   %F  Equivalent to %Y-%m-%d (ymd's canonical format)
  123   %g  ISO week date year without the century (range 00 to 99)
  124   %G  ISO week date year including the century
  125   %j  Equivalent to %D
  126   %m  The month in the current calendar (range 00 to 19)
  127   %Q  The quarter of the year (range Q1 to Q4)
  128   %q  The number of the quarter (range 01 to 04)
  129   %s  The number of seconds since the Epoch.
  130   %u  The weekday as number (range 01 to 07, Sunday being 07)
  131   %U  The week count,  day of week is Sun (range 00 to 53)
  132   %V  The ISO week count,  day of week is Mon (range 01 to 53)
  133   %w  The weekday as number (range 00 to 06, Sunday being 00)
  134   %W  The week count,  day of week is Mon (range 00 to 53)
  135   %y  The year without a century (range 00 to 99)
  136   %Y  The year including the century
  137   %_y The year shortened to a single digit
  138   %Z  The zone offset in hours and minutes (HH:MM) with
  139       a preceding sign (+ for offsets east of UTC, - for offsets
  140       west of UTC)
  141 .fi
  142 .PP
  143 .nf
  144   %Od The day as roman numerals
  145   %Om The month as roman numerals
  146   %Oy The two digit year as roman numerals
  147   %OY The year including the century as roman numerals
  148 .fi
  149 .PP
  150 .nf
  151   %rs In time systems whose Epoch is different from the unix Epoch, this
  152       selects the number of seconds since then.
  153   %rY In calendars with years that don't coincide with the Gregorian
  154       years, this selects the calendar's year.
  155 .fi
  156 .PP
  157 .nf
  158   %dth  The day of the month as an ordinal number, 1st, 2nd, 3rd, etc.
  159   %mth  The month of the year as an ordinal number, 1st, 2nd, 3rd, etc.
  160 .fi
  161 .PP
  162 .nf
  163   %db The business day of the month (since last month's ultimo)
  164   %dB Number of business days until this month's ultimo
  165 .fi
  166 .PP
  167 Time specs:
  168 .nf
  169   %H  The hour of the day using a 24h clock, 2 digits (range 00 to 23)
  170   %I  The hour of the day using a 12h clock, 2 digits (range 01 to 12)
  171   %M  The minute (range 00 to 59)
  172   %N  The nanoseconds (range 000000000 to 999999999)
  173   %p  The string AM or PM, noon is PM and midnight is AM.
  174   %P  Like %p but in lowercase
  175   %S  The  (range 00 to 60, 60 is for leap seconds)
  176   %T  Equivalent to %H:%M:%S
  177 .fi
  178 .PP
  179 General specs:
  180 .nf
  181   %n  A newline character
  182   %t  A tab character
  183   %%  A literal % character
  184 .fi
  185 .PP
  186 Modifiers:
  187 .nf
  188   %O  Modifier to turn decimal numbers into Roman numerals
  189   %r  Modifier to turn units into real units
  190   %0  Modifier to turn on zero prefixes
  191   %SPC  Modifier to turn on space prefixes
  192   %-  Modifier to turn off prefixes altogether
  193   th  Suffix, read and print ordinal numbers
  194   b   Suffix, treat days as business days
  195 .fi
  196 .PP
  197 By design dates before 1601-01-01 are not supported.
  198 .PP
  199 For conformity here is a list of calendar designators and their
  200 corresponding format string:
  201 .nf
  202   ymd     %Y-%m-%d
  203   ymcw    %Y-%m-%c-%w
  204   ywd     %rY-W%V-%u
  205   bizda   %Y-%m-%db
  206   lilian     n/a
  207   ldn        n/a
  208   julian     n/a
  209   jdn        n/a
  210   matlab     n/a
  211   mdn        n/a
  212 .fi
  213 .PP
  214 These designators can be used as output format string, moreover,
  215 @code{lilian}/@code{ldn} and @code{julian}/@code{jdn} can also be used
  216 as input format string.
  217 
  218 .SH SPECIFYING DURATIONS
  219 .PP
  220 Some tools ("dateadd", "dateseq") need durations as their input.
  221 Durations are generally incompatible with input formats as specified by
  222 "-i|--input-format" and (at the moment) the input syntax is fixed.
  223 .PP
  224 The general format is "+-Nunit" where "+" or "-" is the
  225 sign, "N" a number, and "unit" the unit as discussed below.
  226 .PP
  227 Units:
  228 .nf
  229   s  seconds
  230   m  minutes
  231   h  hours
  232   rs real-life seconds, as in including leap  transitions
  233 .fi
  234 .PP
  235 .nf
  236   d  days
  237   b  business days
  238   mo months
  239   y  years
  240 .fi
  241 .PP
  242 For historical reasons, we used to accept "m" in the context of
  243 date-only input as a qualifier for months.  As of 0.4.4, this is no
  244 longer the case.
  245 
  246 .SH EXAMPLES
  247 .PP
  248 .nf
  249   $ dateseq 2012-02-01 2012-03-01
  250   2012-02-01
  251   2012-02-02
  252   2012-02-03
  253   2012-02-04
  254   2012-02-05
  255   2012-02-06
  256   2012-02-07
  257   2012-02-08
  258   2012-02-09
  259   2012-02-10
  260   2012-02-11
  261   2012-02-12
  262   2012-02-13
  263   2012-02-14
  264   2012-02-15
  265   2012-02-16
  266   2012-02-17
  267   2012-02-18
  268   2012-02-19
  269   2012-02-20
  270   2012-02-21
  271   2012-02-22
  272   2012-02-23
  273   2012-02-24
  274   2012-02-25
  275   2012-02-26
  276   2012-02-27
  277   2012-02-28
  278   2012-02-29
  279   2012-03-01
  280   $
  281 .fi
  282 .PP
  283 .nf
  284   $ dateseq 2001-02-03 2001-03-03 --skip sat -f "%F %a"
  285   2001-02-04 Sun
  286   2001-02-05 Mon
  287   2001-02-06 Tue
  288   2001-02-07 Wed
  289   2001-02-08 Thu
  290   2001-02-09 Fri
  291   2001-02-11 Sun
  292   2001-02-12 Mon
  293   2001-02-13 Tue
  294   2001-02-14 Wed
  295   2001-02-15 Thu
  296   2001-02-16 Fri
  297   2001-02-18 Sun
  298   2001-02-19 Mon
  299   2001-02-20 Tue
  300   2001-02-21 Wed
  301   2001-02-22 Thu
  302   2001-02-23 Fri
  303   2001-02-25 Sun
  304   2001-02-26 Mon
  305   2001-02-27 Tue
  306   2001-02-28 Wed
  307   2001-03-01 Thu
  308   2001-03-02 Fri
  309   $
  310 .fi
  311 .PP
  312 .nf
  313   $ dateseq --compute-from-last 2001-02-03 1 2001-03-03 --skip sat -f "%F %a"
  314   2001-02-04 Sun
  315   2001-02-05 Mon
  316   2001-02-06 Tue
  317   2001-02-07 Wed
  318   2001-02-08 Thu
  319   2001-02-09 Fri
  320   2001-02-11 Sun
  321   2001-02-12 Mon
  322   2001-02-13 Tue
  323   2001-02-14 Wed
  324   2001-02-15 Thu
  325   2001-02-16 Fri
  326   2001-02-18 Sun
  327   2001-02-19 Mon
  328   2001-02-20 Tue
  329   2001-02-21 Wed
  330   2001-02-22 Thu
  331   2001-02-23 Fri
  332   2001-02-25 Sun
  333   2001-02-26 Mon
  334   2001-02-27 Tue
  335   2001-02-28 Wed
  336   2001-03-01 Thu
  337   2001-03-02 Fri
  338   $
  339 .fi
  340 .PP
  341 .nf
  342   $ dateseq 2001-02-03 3 2001-03-03 --skip sat,fri -f "%F %a"
  343   2001-02-06 Tue
  344   2001-02-12 Mon
  345   2001-02-15 Thu
  346   2001-02-18 Sun
  347   2001-02-21 Wed
  348   2001-02-27 Tue
  349   $
  350 .fi
  351 .PP
  352 .nf
  353   $ dateseq --compute-from-last 2001-02-03 3 2001-03-03 --skip sat,fri -f "%F %a"
  354   2001-02-04 Sun
  355   2001-02-07 Wed
  356   2001-02-13 Tue
  357   2001-02-19 Mon
  358   2001-02-22 Thu
  359   2001-02-25 Sun
  360   2001-02-28 Wed
  361   $
  362 .fi
  363 .PP
  364 .nf
  365   $ dateseq 2001-02-05 4 2001-03-04 -f "%F %a"
  366   2001-02-05 Mon
  367   2001-02-09 Fri
  368   2001-02-13 Tue
  369   2001-02-17 Sat
  370   2001-02-21 Wed
  371   2001-02-25 Sun
  372   2001-03-01 Thu
  373   $
  374 .fi
  375 .PP
  376 .nf
  377   $ dateseq --compute-from-last 2001-02-05 4 2001-03-04 -f "%F %a"
  378   2001-02-08 Thu
  379   2001-02-12 Mon
  380   2001-02-16 Fri
  381   2001-02-20 Tue
  382   2001-02-24 Sat
  383   2001-02-28 Wed
  384   2001-03-04 Sun
  385   $
  386 .fi
  387 .PP
  388 .nf
  389   $ dateseq --alt-inc 1d 2001-02-03 3 2001-03-03 --skip sat,fri -f "%F %a"
  390   2001-02-04 Sun
  391   2001-02-07 Wed
  392   2001-02-11 Sun
  393   2001-02-14 Wed
  394   2001-02-18 Sun
  395   2001-02-21 Wed
  396   2001-02-25 Sun
  397   2001-02-28 Wed
  398   $
  399 .fi
  400 .PP
  401 .nf
  402   $ dateseq --compute-from-last --alt-inc 1d 2001-02-03 3 2001-03-03 --skip sat,fri -f "%F %a"
  403   2001-02-04 Sun
  404   2001-02-07 Wed
  405   2001-02-11 Sun
  406   2001-02-14 Wed
  407   2001-02-18 Sun
  408   2001-02-21 Wed
  409   2001-02-25 Sun
  410   2001-02-28 Wed
  411   $
  412 .fi
  413 .PP
  414 .nf
  415   $ dateseq 2001-01-01 2d 2001-01-08
  416   2001-01-01
  417   2001-01-03
  418   2001-01-05
  419   2001-01-07
  420   $
  421 .fi
  422 .PP
  423 .nf
  424   $ dateseq --compute-from-last 2001-01-01 2d 2001-01-08
  425   2001-01-02
  426   2001-01-04
  427   2001-01-06
  428   2001-01-08
  429   $
  430 .fi
  431 .PP
  432 .nf
  433   $ dateseq 2001-01-08 -2d 2001-01-01
  434   2001-01-08
  435   2001-01-06
  436   2001-01-04
  437   2001-01-02
  438   $
  439 .fi
  440 .PP
  441 .nf
  442   $ dateseq --compute-from-last 2001-01-08 -2d 2001-01-01
  443   2001-01-07
  444   2001-01-05
  445   2001-01-03
  446   2001-01-01
  447   $
  448 .fi
  449 .PP
  450 .nf
  451   $ dateseq 10:00:00 12m 11:20:00
  452   10:00:00
  453   10:12:00
  454   10:24:00
  455   10:36:00
  456   10:48:00
  457   11:00:00
  458   11:12:00
  459   $
  460 .fi
  461 .PP
  462 .nf
  463   $ dateseq --compute-from-last 10:00:00 12m 11:20:00
  464   10:08:00
  465   10:20:00
  466   10:32:00
  467   10:44:00
  468   10:56:00
  469   11:08:00
  470   11:20:00
  471   $
  472 .fi
  473 .PP
  474 .nf
  475   $ dateseq 11:20:00 -12m 10:00:00
  476   11:20:00
  477   11:08:00
  478   10:56:00
  479   10:44:00
  480   10:32:00
  481   10:20:00
  482   10:08:00
  483   $
  484 .fi
  485 .PP
  486 .nf
  487   $ dateseq --compute-from-last 11:20:00 -12m 10:00:00
  488   11:12:00
  489   11:00:00
  490   10:48:00
  491   10:36:00
  492   10:24:00
  493   10:12:00
  494   10:00:00
  495   $
  496 .fi
  497 .PP
  498 
  499 .SH AUTHOR
  500 Written by Sebastian Freundt <freundt@fresse.org>
  501 .PP
  502 .SH REPORTING BUGS
  503 Report bugs to: https://github.com/hroptatyr/dateutils/issues
  504 .PP
  505 
  506 
  507 
  508 .SH "SEE ALSO"
  509 The full documentation for
  510 .B dateseq
  511 is maintained as a Texinfo manual.  If the
  512 .B info
  513 and
  514 .B dateseq
  515 programs are properly installed at your site, the command
  516 .IP
  517 .B info (dateutils)dateseq
  518 .PP
  519 should give you access to the complete manual.
  520 .\" yuck.m4man ends here