@@ -132,7 +132,7 @@ Specifies the desired output format for \fBclock format\fR or the
132
132
expected input format for \fB clock scan \fR . The \fI format \fR string consists
133
133
of any number of characters other than the per-cent sign
134
134
.PQ \fB % \fR
135
- interspersed with any number of \fI format groups \fR , which are two-character
135
+ interspersed with any number of \fI format groups \fR , which are two- or three- character
136
136
sequences beginning with the per-cent sign. The permissible format groups,
137
137
and their interpretation, are described under \fB FORMAT GROUPS \fR .
138
138
.RS
@@ -194,6 +194,15 @@ the environment variable \fBTZ\fR.
194
194
.IP [3]
195
195
on Windows systems, the time zone settings from the Control Panel.
196
196
.RE
197
+ .\" OPTION: -validate
198
+ .TP
199
+ \fB \- validate \fR boolean
200
+ .
201
+ If \fI boolean \fR is true (default), \fB clock scan \fR will raise an error
202
+ if the input contains invalid values, e.g. day of month greater than
203
+ number of days in the month. If specified as false, the command makes
204
+ an adjustment to bring values within acceptable range. See
205
+ \fB SCANNING TIMES \f T for details.
197
206
.PP
198
207
If none of these is present, the C \fB localtime \fR and \fB mktime \fR
199
208
functions are used to attempt to convert times between local and
@@ -492,7 +501,9 @@ time zone when converting local times. This caveat does not apply to
492
501
UTC times.)
493
502
.PP
494
503
If the interpretation of the groups yields an impossible time because
495
- a field is out of range, enough of that field's unit will be added to
504
+ a field is out of range, an exception is raised if the \fB -validate \fR
505
+ option is not present or passed as true. If passed as false,
506
+ enough of that field's unit will be added to
496
507
or subtracted from the time to bring it in range. Thus, if attempting to
497
508
scan or format day 0 of the month, one day will be subtracted from day
498
509
1 of the month, yielding the last day of the previous month.
0 commit comments