Mercurial > octave-antonio
comparison scripts/time/datestr.m @ 20162:2645f9ef8c88 stable
doc: Update more docstrings to have one sentence summary as first line.
Reviewed specfun, special-matrix, testfun, and time script directories.
* scripts/specfun/expint.m, scripts/specfun/isprime.m,
scripts/specfun/legendre.m, scripts/specfun/primes.m,
scripts/specfun/reallog.m, scripts/specfun/realsqrt.m,
scripts/special-matrix/gallery.m, scripts/special-matrix/hadamard.m,
scripts/special-matrix/hankel.m, scripts/special-matrix/hilb.m,
scripts/special-matrix/invhilb.m, scripts/special-matrix/magic.m,
scripts/special-matrix/pascal.m, scripts/special-matrix/rosser.m,
scripts/special-matrix/toeplitz.m, scripts/special-matrix/vander.m,
scripts/special-matrix/wilkinson.m, scripts/testfun/assert.m,
scripts/testfun/demo.m, scripts/testfun/example.m, scripts/testfun/fail.m,
scripts/testfun/rundemos.m, scripts/testfun/runtests.m,
scripts/testfun/speed.m, scripts/time/asctime.m, scripts/time/calendar.m,
scripts/time/clock.m, scripts/time/ctime.m, scripts/time/datenum.m,
scripts/time/datestr.m, scripts/time/datevec.m, scripts/time/etime.m,
scripts/time/is_leap_year.m, scripts/time/now.m, scripts/time/weekday.m:
Update more docstrings to have one sentence summary as first line.
author | Rik <rik@octave.org> |
---|---|
date | Sun, 03 May 2015 17:00:11 -0700 |
parents | e9f89866074c |
children |
comparison
equal
deleted
inserted
replaced
20160:03b9d17a2d95 | 20162:2645f9ef8c88 |
---|---|
19 ## -*- texinfo -*- | 19 ## -*- texinfo -*- |
20 ## @deftypefn {Function File} {@var{str} =} datestr (@var{date}) | 20 ## @deftypefn {Function File} {@var{str} =} datestr (@var{date}) |
21 ## @deftypefnx {Function File} {@var{str} =} datestr (@var{date}, @var{f}) | 21 ## @deftypefnx {Function File} {@var{str} =} datestr (@var{date}, @var{f}) |
22 ## @deftypefnx {Function File} {@var{str} =} datestr (@var{date}, @var{f}, @var{p}) | 22 ## @deftypefnx {Function File} {@var{str} =} datestr (@var{date}, @var{f}, @var{p}) |
23 ## Format the given date/time according to the format @code{f} and return | 23 ## Format the given date/time according to the format @code{f} and return |
24 ## the result in @var{str}. @var{date} is a serial date number (see | 24 ## the result in @var{str}. |
25 ## @code{datenum}) or a date vector (see @code{datevec}). The value of | 25 ## |
26 ## @var{date} may also be a string or cell array of strings. | 26 ## @var{date} is a serial date number (see @code{datenum}) or a date vector |
27 ## | 27 ## (see @code{datevec}). The value of @var{date} may also be a string or cell |
28 ## @var{f} can be an integer which corresponds to one of the codes in | 28 ## array of strings. |
29 ## the table below, or a date format string. | 29 ## |
30 ## | 30 ## @var{f} can be an integer which corresponds to one of the codes in the table |
31 ## @var{p} is the year at the start of the century in which two-digit years | 31 ## below, or a date format string. |
32 ## are to be interpreted in. If not specified, it defaults to the current | 32 ## |
33 ## year minus 50. | 33 ## @var{p} is the year at the start of the century in which two-digit years are |
34 ## to be interpreted in. If not specified, it defaults to the current year | |
35 ## minus 50. | |
34 ## | 36 ## |
35 ## For example, the date 730736.65149 (2000-09-07 15:38:09.0934) would be | 37 ## For example, the date 730736.65149 (2000-09-07 15:38:09.0934) would be |
36 ## formatted as follows: | 38 ## formatted as follows: |
37 ## | 39 ## |
38 ## @multitable @columnfractions 0.1 0.45 0.35 | 40 ## @multitable @columnfractions 0.1 0.45 0.35 |
92 ## @item FFF @tab Milliseconds of second (padded with zeros) @tab 10:05:03.012 | 94 ## @item FFF @tab Milliseconds of second (padded with zeros) @tab 10:05:03.012 |
93 ## @item AM @tab Use 12-hour time format @tab 11:30 AM | 95 ## @item AM @tab Use 12-hour time format @tab 11:30 AM |
94 ## @item PM @tab Use 12-hour time format @tab 11:30 PM | 96 ## @item PM @tab Use 12-hour time format @tab 11:30 PM |
95 ## @end multitable | 97 ## @end multitable |
96 ## | 98 ## |
97 ## If @var{f} is not specified or is @code{-1}, then use 0, 1 or 16, | 99 ## If @var{f} is not specified or is @code{-1}, then use 0, 1 or 16, depending |
98 ## depending on whether the date portion or the time portion of | 100 ## on whether the date portion or the time portion of @var{date} is empty. |
99 ## @var{date} is empty. | |
100 ## | 101 ## |
101 ## If @var{p} is nor specified, it defaults to the current year minus 50. | 102 ## If @var{p} is nor specified, it defaults to the current year minus 50. |
102 ## | 103 ## |
103 ## If a matrix or cell array of dates is given, a column vector of date strings | 104 ## If a matrix or cell array of dates is given, a column vector of date strings |
104 ## is returned. | 105 ## is returned. |