[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #59979] Unexpected format for output from date
From: |
Markus Mützel |
Subject: |
[Octave-bug-tracker] [bug #59979] Unexpected format for output from datevec |
Date: |
Mon, 1 Feb 2021 11:49:42 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36 Edg/88.0.705.56 |
Follow-up Comment #17, bug #59979 (project octave):
Regarding the date with day 0 and month 0:
I see the following in Matlab R2020b:
>> datevec(-2:0.5:2)
ans =
-1 12 29 0 0 0
-1 12 29 12 0 0
-1 12 30 0 0 0
-1 12 30 12 0 0
0 0 0 0 0 0
0 0 0 12 0 0
0 1 1 0 0 0
0 1 1 12 0 0
0 1 2 0 0 0
>> datevec(365:0.5:368)
ans =
0 12 30 0 0 0
0 12 30 12 0 0
0 12 31 0 0 0
0 12 31 12 0 0
1 1 1 0 0 0
1 1 1 12 0 0
1 1 2 0 0 0
There seems to be no 31st of December in the year 1 BCE. But there is a 31st
of December in the year 0 CE.
I find that rather surprising because I assumed `datevec` returns the date and
time.
But it looks like others expect it to return something different.
>From Matlab's documentation:
> DateVector = datevec(t) converts the datetime or duration value t to a date
vector—that is, a numeric vector whose six elements represent the year,
month, day, hour, minute, and second components of t.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?59979>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #59979] Unexpected format for output from datevec, Philip Nienhuis, 2021/02/01
- [Octave-bug-tracker] [bug #59979] Unexpected format for output from datevec, John W. Eaton, 2021/02/01
- [Octave-bug-tracker] [bug #59979] Unexpected format for output from datevec,
Markus Mützel <=
- [Octave-bug-tracker] [bug #59979] Unexpected format for output from datevec, Markus Mützel, 2021/02/01
- [Octave-bug-tracker] [bug #59979] Unexpected format for output from datevec, John W. Eaton, 2021/02/01
- [Octave-bug-tracker] [bug #59979] Unexpected format for output from datevec, Tasos Papastylianou, 2021/02/01
- [Octave-bug-tracker] [bug #59979] Unexpected format for output from datevec, Markus Mützel, 2021/02/01
- [Octave-bug-tracker] [bug #59979] Unexpected format for output from datevec, Rik, 2021/02/24
- [Octave-bug-tracker] [bug #59979] Unexpected format for output from datevec, Rik, 2021/02/24