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

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

[Octave-bug-tracker] [bug #59979] Unexpected format for output from date


From: Philip Nienhuis
Subject: [Octave-bug-tracker] [bug #59979] Unexpected format for output from datevec
Date: Mon, 1 Feb 2021 08:07:25 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0

Follow-up Comment #15, bug #59979 (project octave):

@Markus comment #12:
Maybe Matlab deliberately rounds up as soon as the smallest fraction in
datevec's output for seconds (milliseconds, 'FFF') is prone to be rounded
(i.e., seconds >= 59.9995 milliseconds)?
(I suppose that's the actual question asked in comment #6.)

If so, Matlab's behavior wouldn't be unreasonable IMO. That is, I think
datenums are simply the most accurate and suitable for date/time calculations,
while IMO datevec and datestr are just interpretations/translations of some
time value for display purposes and shouldn't be used for (much) further
processing.
Even if the display is wrong the totals are still correct, so it's primarily a
cosmetics bug.


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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