Mercurial > octave
changeset 30645:beac32c0e9c7 stable
datevec.m: Allow day and day of week to occur in the same format string (bug #47627).
* scripts/time/datevec.m (__date_vfmt2sfmt__): Allow day and day of week
specifiers to occur (not more than once respectively) in the same format string.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Wed, 12 Jan 2022 17:55:32 +0100 |
parents | b7df783dbe43 |
children | 7677d53497c9 b20da6bed444 |
files | scripts/time/datevec.m |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/time/datevec.m Fri Jan 14 15:48:34 2022 +0100 +++ b/scripts/time/datevec.m Wed Jan 12 17:55:32 2022 +0100 @@ -251,9 +251,10 @@ elseif (numel (strfind (f, "%m")) + numel (strfind (f, "%b")) + numel (strfind (f, "%B")) > 1) err_or_warn ("datevec: multiple month specifiers in %s", original_f); - elseif (numel (strfind (f, "%d")) + numel (strfind (f, "%a")) - + numel (strfind (f, "%A")) > 1) + elseif (numel (strfind (f, "%d")) > 1) err_or_warn ("datevec: multiple day specifiers in %s", original_f); + elseif (numel (strfind (f, "%a"))+ numel (strfind (f, "%A")) > 1) + err_or_warn ("datevec: multiple day of week specifiers in %s", original_f); elseif (numel (strfind (f, "%H")) + numel (strfind (f, "%I")) > 1) err_or_warn ("datevec: multiple hour specifiers in %s", original_f); elseif (numel (strfind (f, "%M")) > 1)