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: anonymous
Subject: [Octave-bug-tracker] [bug #59979] Unexpected format for output from datevec
Date: Sun, 31 Jan 2021 13:57:02 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:85.0) Gecko/20100101 Firefox/85.0

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

This code gives correct results in the seconds position. Rounding works
correctly.

for DELTA = [0 1 59 60 61]
    datevec(((0:1200:1e5) + DELTA) ./ 86400 + floor(now))
end


This test also works accurately where [0 1 59 60 61] are mapped to [0 1 59 0
1] respectively:

octave:2> for DELTA = [0 59 60 61], tmp = datevec(((0:1200:1e6) + DELTA) /
86400 + floor(now)); unique(tmp(:,end)), end
ans = 0
ans = 1
ans = 59
ans = 0
ans = 1


Is there any need for extra rounding within datevec?


    _______________________________________________________

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]