octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #47627] datenum input validation should be str


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #47627] datenum input validation should be stricter
Date: Fri, 14 Jan 2022 12:34:36 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36 Edg/97.0.1072.55

Update of bug #47627 (project octave):

                  Status:             In Progress => Ready For Test         

    _______________________________________________________

Follow-up Comment #24:

I pushed another patch adding the warning to the default branch here:
http://hg.savannah.gnu.org/hgweb/octave/rev/e9bfb92dab01

With it the output for some examples is:

>> datenum('2015-03-31 0:00','YYYY-MM-DD HH:MM')

warning: datevec: Format specifiers for dates should be lower case, format
specifiers for time should be upper case.  Possible issue with 'm' (month) and
'M' (minutes)?
warning: called from
    datevec>__date_vfmt2sfmt__ at line 212 column 5
    datevec at line 144 column 44
    datenum at line 119 column 46

error: datevec: multiple minute specifiers in YYYY-MM-DD HH:MM
error: called from
    datevec>__date_vfmt2sfmt__ at line 268 column 5
    datevec at line 144 column 44
    datenum at line 119 column 46
>> datenum('2015-03-31','YYYY-MM-DD')

warning: datevec: Format specifiers for dates should be lower case, format
specifiers for time should be upper case.  Possible issue with 'm' (month) and
'M' (minutes)?
warning: called from
    datevec>__date_vfmt2sfmt__ at line 212 column 5
    datevec at line 144 column 44
    datenum at line 119 column 46

ans = 7.3600e+05
>>


Marking as ready for test.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?47627>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]