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

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

[Octave-bug-tracker] [bug #60107] datenum : 1 day missing from output?


From: Paul Netsaver
Subject: [Octave-bug-tracker] [bug #60107] datenum : 1 day missing from output?
Date: Tue, 23 Feb 2021 19:38:48 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36

URL:
  <https://savannah.gnu.org/bugs/?60107>

                 Summary: datenum : 1 day missing from output?
                 Project: GNU Octave
            Submitted by: netsaver
            Submitted on: Wed 24 Feb 2021 12:38:46 AM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: None
             Assigned to: None
         Originator Name: Netsaver Paul
        Originator Email: 
             Open/Closed: Open
                 Release: 6.2.0
         Discussion Lock: Any
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

*Original code*:
dn = datenum('00','YY');
ds = datestr(dn,'YY');
ds = datestr(dn+1,'YY');
ds = datestr(dn+1,'YY-MM-DD');

*Octave*:
dn = 730485
ds = '99'              % should be back to '00'
ds = '00'
ds = '00-00-01'        % should have positive months

*Matlab*:
dn = 730486
ds = '00'
ds = '00-01-01'
ds = '00-01-02'

it seems Octave computes datenum 1-day less; moreover, months start from 00,
not 01.






    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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