[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #60671] Wrong result when subtracting one mont
From: |
Georg Wiora |
Subject: |
[Octave-bug-tracker] [bug #60671] Wrong result when subtracting one month from 31-MON-YEAR date |
Date: |
Wed, 26 May 2021 08:16:12 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0 |
Follow-up Comment #6, bug #60671 (project octave):
I entered the following test cases in Matlab onramp:
>> datestr(addtodate(datenum('2021-02-28'),1,'month'))
ans = 28-Mar-2021
>> datestr(addtodate(datenum('2021-03-31'),-1,'month'))
ans = 28-Feb-2021
This is the same behavior that my fix (file #51475) provides.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?60671>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/