# HG changeset patch # User Markus Mützel # Date 1693049110 -7200 # Node ID 2e8b8d38431c1cb0122d62d038060b32d563e62d # Parent e81b372d1203dae75d45127b3250a202239a3395 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. diff -r e81b372d1203 -r 2e8b8d38431c scripts/time/datevec.m --- 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