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

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

[Octave-bug-tracker] [bug #60671] Wrong result when subtracting one mont


From: Nicholas Jankowski
Subject: [Octave-bug-tracker] [bug #60671] Wrong result when subtracting one month from 31-MON-YEAR date
Date: Fri, 5 Nov 2021 14:02:29 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36

Update of bug #60671 (project octave):

                  Status:                    None => Patch Submitted        

    _______________________________________________________

Follow-up Comment #9:

ok, thanks for the reminder Georg.

it helps maintainers consider code changes when they've been made into a patch
on the Octave codebase. (See https://wiki.octave.org/Mercurial if you want to
see how to produce one.)

I had difficulty creating a patch by just adding your file to the current
codebase, it appears you based it on a fairly old version of the function with
a different copyright header, and your system used a different line ending
(linux usually user LF, Windows uses CR/LF, yours just used CR.). Octave
should be able to be set to save with LF endings.  for the former, always try
to make changes using the latest development sources (see link above).

Anyway, adjusting for those was fairly simple. i also added a few of the
examples in these comments as tests and checked them against matlab.  The
patched file passes all tests and seems to fix this bug.

attached is the patch that makes these changes and adds a comment to NEWS
about the bugfix as well as the updated addtodate.m file with those changes

i used your name as patch author, but do you want an email address added as
well? that can be added if/when this gets pushed to the codebase.

(file #52203, file #52204)
    _______________________________________________________

Additional Item Attachment:

File name: addtodate_endofmonthfix_bug60671.diff Size:2 KB
   
<https://file.savannah.gnu.org/file/addtodate_endofmonthfix_bug60671.diff?file_id=52203>

File name: addtodate.m                    Size:5 KB
    <https://file.savannah.gnu.org/file/addtodate.m?file_id=52204>



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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