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

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

[Octave-bug-tracker] [bug #46171] datevec fails with FFF and PM


From: Nick Jankowski
Subject: [Octave-bug-tracker] [bug #46171] datevec fails with FFF and PM
Date: Sun, 11 Oct 2015 03:02:43 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0

Follow-up Comment #2, bug #46171 (project octave):

starting to step through datevec.m, stumbled onto the fact that inside the
kludge it doesn't distinguish between .2 .02 and .002.  all three give the
output of .002

i don't know if it should error out if FFF is given but less than three digits
are there. I can see where some programs or systems might drop trailing zeros.


If we need to throw an error for ML compatibility, that should be easy enough
by checking numel(msec)<3.

If it needs to function, inserting the following line before 262 fixes the
problem:


msec = [msec,'0'(ones(1,3-numel(msec)))];


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?46171>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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