[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #49570] datenum gives incorrect results for mo
From: |
Markus Mützel |
Subject: |
[Octave-bug-tracker] [bug #49570] datenum gives incorrect results for month > 14 |
Date: |
Wed, 9 Nov 2016 17:33:58 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:50.0) Gecko/20100101 Firefox/50.0 |
URL:
<http://savannah.gnu.org/bugs/?49570>
Summary: datenum gives incorrect results for month > 14
Project: GNU Octave
Submitted by: mmuetzel
Submitted on: Wed 09 Nov 2016 05:33:56 PM GMT
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Any
_______________________________________________________
Details:
While Matlab accepts months > 14 as an input to datenum moving those months to
the subsequent years, Octave wraps them back one year (minus February).
Example in Octave:
>> datenum (4, 10:16,1)
ans =
1736 1767 1797 1828 1859 1522 1553
>> diff (ans)
ans =
31 30 31 31 -337 31
In Matlab:
>> datenum (4, 10:16,1)
ans =
1736 1767 1797 1828 1859 1887
1918
>> diff (ans)
ans =
31 30 31 31 28 31
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?49570>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #49570] datenum gives incorrect results for month > 14,
Markus Mützel <=