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: John W. Eaton
Subject: [Octave-bug-tracker] [bug #59979] Unexpected format for output from datevec
Date: Mon, 1 Feb 2021 13:08:24 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

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

If I pass a duration to datevec, I would probably expect it to return the
number of years, months, hours, minutes, and seconds of the elapsed time
represented by the duration.  In that case, I also wouldn't expect elapsed
time to be negative.  But if datevec is supposed to return an actual date,
then it doesn't make sense to have the month or day set to zero.  OTOH, it
isn't always returning correct calendar dates anyway because calendar dates
have done some strange things.

Maybe this is just a poorly defined function?

I'm not sure what the best fix is, but the current behavior seems bad because
sometimes it just looks wrong and it is also not consistent with the results
Matlab produces, so without some changes we are sure to see more bug reports.

    _______________________________________________________

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]