bug in datestr.m with yyyy and dd
John W. Eaton
jwe at octave.org
Fri Jan 30 13:08:26 CST 2009
On 30-Jan-2009, Benjamin Lindner wrote:
| Hello,
|
| in the current development sources, I believe there is a bug in
| datestr.m with regard to the format strings used.
|
| I see that a 4-digit year (YYYY) is changed to "%C%y" and the 2-digit
| day to "%e".
| Consulting my C Programming Language Reference Manual, strftime's format
| strings would be
|
| %Y Year with century
| %d Day of the month (01-31)
|
| datestr's test currently fails under mingw32, with the attached
| changeset, all tests succeed.
I applied this changeset.
I don't think changing %C%y to %Y changes anything. But %d pads with
0 while %e pads with a space. But now I see that the Matlab docs say
that "dd" should pad with 0, so I'm not sure why we were using %e
anyway.
Thanks,
jwe
More information about the Bug-octave
mailing list