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

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

[Octave-bug-tracker] [bug #50673] datestr truncates fractional minutes r


From: Lars Kindermann
Subject: [Octave-bug-tracker] [bug #50673] datestr truncates fractional minutes rather than rounding
Date: Wed, 29 Mar 2017 21:25:20 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

Follow-up Comment #5, bug #50673 (project octave):

I have attached a patch that rounds fractional seconds >= 0.9995 s to the next
full second before formatting in datestr(). That also avoids printing 1000 ms
in a FFF field.


datestr(datenum('1:00')-datenum('0:55'))
ans = 12:05 AM


(file #40202)
    _______________________________________________________

Additional Item Attachment:

File name: datestr.diff                   Size:0 KB


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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