Mercurial > octave
changeset 32302:68f3ec939f92 stable
datevec: Add help text that inputs can be arrays (bug #54679).
* datevec.m: Update help text to explain that arguments can be scalar or
arrays.
author | Nicholas R. Jankowski <jankowski.nicholas@gmail.com> |
---|---|
date | Thu, 14 Sep 2023 14:13:10 -0400 |
parents | 0d98002c141d |
children | 17e858ca7ea1 66a8907102c5 |
files | scripts/time/datevec.m |
diffstat | 1 files changed, 16 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/time/datevec.m Mon Nov 22 20:24:11 2021 -0500 +++ b/scripts/time/datevec.m Thu Sep 14 14:13:10 2023 -0400 @@ -35,20 +35,30 @@ ## A date vector is a row vector with six members, representing the year, ## month, day, hour, minute, and seconds respectively. ## +## Date number inputs can be either a scalar or nonscalar array. Date string +## inputs can be either a single date string, a two-dimensional character +## array of dates with each row being an interpretable date string, or a cell +## string array of any dimension with each cell element containing a single +## interpretable date string. +## +## @var{v} is a two-dimensional array of date vectors, one date vector per +## row. For array inputs, ordering of @var{v} is based on column major order +## of dates in @var{data}. +## ## @var{f} is the format string used to interpret date strings ## (@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 +## 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 -## 50. +## will be referenced. If not specified, it defaults to the current year +## minus 50. ## @seealso{datenum, datestr, clock, now, date} ## @end deftypefn