Mercurial > octave
changeset 32276:2e8b8d38431c stable
doc: Clarify that heuristics are used to detect the format of a date string (bug #64563).
* scripts/time/datevec.m: Add sentences in the documentation to clarify that
heuristics are used when no format string is provided.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Sat, 26 Aug 2023 13:25:10 +0200 |
parents | e81b372d1203 |
children | 036fdcd3e7c1 6fa106924c19 |
files | scripts/time/datevec.m |
diffstat | 1 files changed, 9 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/time/datevec.m Wed Aug 23 19:12:39 2023 -0400 +++ b/scripts/time/datevec.m Sat Aug 26 13:25:10 2023 +0200 @@ -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