Mercurial > hg > octave-avbm
changeset 10262:2b05f4aff27c
fix off-by-one month error in dir
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Thu, 04 Feb 2010 08:10:31 +0100 |
parents | a4fb4675accb |
children | 07dedea2e0a4 |
files | scripts/ChangeLog scripts/miscellaneous/dir.m |
diffstat | 2 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2010-02-04 Jaroslav Hajek <highegg@gmail.com> + + * miscellaneous/dir.m: Fix month passed to datenum. + 2010-02-03 Jaroslav Hajek <highegg@gmail.com> * general/private/__isequal__.m: Handle function handles.
--- a/scripts/miscellaneous/dir.m +++ b/scripts/miscellaneous/dir.m @@ -117,7 +117,7 @@ info(i,1).date = strftime ("%d-%b-%Y %T", lt); info(i,1).bytes = st.size; info(i,1).isdir = S_ISDIR (st.mode); - info(i,1).datenum = datenum (lt.year + 1900, lt.mon, lt.mday, + info(i,1).datenum = datenum (lt.year + 1900, lt.mon + 1, lt.mday, lt.hour, lt.min, lt.sec); info(i,1).statinfo = st; endif