Skip to content

Commit

Permalink
doc: Clarify that heuristics are used to detect the format of a date …
Browse files Browse the repository at this point in the history
…string (bug #64563).

* scripts/time/datevec.m: Add sentences in the documentation to clarify that
heuristics are used when no format string is provided.
  • Loading branch information
mmuetzel committed Aug 26, 2023
1 parent 969e997 commit f4c8d91
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions scripts/time/datevec.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,15 @@
## month, day, hour, minute, and seconds respectively.
##
## @var{f} is the format string used to interpret date strings
## (@pxref{XREFdatestr,,@code{datestr}}). If @var{date} is a string, but no
## format is specified, then a relatively slow search is performed through
## various formats. It is always preferable to specify the format string
## @var{f} if it is known. Formats which do not specify a particular time
## component will have the value set to zero. Formats which do not specify a
## date will default to January 1st of the current year.
## (@pxref{XREFdatestr,,@code{datestr}}). If @var{date} is a string or a cell
## array of strings, but no format is specified, heuristics are used to guess
## the input format. These heuristics could lead to matches that differ from
## the result a user might expect. Additionally, this involves a relatively
## slow search through various formats. It is always preferable to specify the
## format string @var{f} if it is known. Formats which do not specify a
## particular time component will have the value set to zero. Formats which do
## not specify a particular date component will default that component to
## January 1st of the current year.
##
## @var{p} is the year at the start of the century to which two-digit years
## will be referenced. If not specified, it defaults to the current year minus
Expand Down

0 comments on commit f4c8d91

Please sign in to comment.