rw-match stamp constraints [VAR program arg ...]
rw-match computes the earliest time at or after the given
timestamp that matches the given constraints. Then, if no variable name and
command are given, it prints the result on stdout. Otherwise, it sets the
environment variable to contain the result and runs the given command.
The constraints are given as, for example, ",d-3,H=14,M/15" (note the leading comma). This example matches any time where the day of the month is the third from the last day of the month, the hour of the day is 14, and the minutes are divisible by 15 - so, 14:00, 14:15, 14:30, and 14:45, on January 29th, or February 26th (or 27th), etc. These constraints match the time acording to the local time zone.
The constraint string consists of a sequence of unit constraints. Each unit constraint consists of a comma, followed by one of the following letters indicating which unit is constrained:
m: month (in the range 1-12).
d: day of the month (in the range 1-28, 1-29, 1-30, or 1-31, as appropriate for the month in question).
w: day of the week (in the range 0-6, with 0 representing Sunday).
H: hour of the day (in the range 0-23).
M: minute of the hour (in the range 0-59).
S: second of the minute (in the range 0-59).
and finally one of the following:
=n: matches times when the given unit is exactly
-n: matches times when the given unit is exactly
m+nis one more than the largest value of the unit. (For example,
,H-1is equivalent to
/n: matches times when the given unit is divisible by
Do not use
,w together with any of
,d. The results will probably not be what
you expect, and may be subject to change in future versions.