Mercurial > hg > octave-avbm
changeset 7493:f1bce8450fd0
[mq]: tmp-patch
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 19 Feb 2008 03:36:08 -0500 |
parents | bd1168732c95 |
children | bd2bd04e68ca |
files | scripts/ChangeLog scripts/time/datestr.m |
diffstat | 2 files changed, 10 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2008-02-19 Bill Denney <bill@denney.ws> + + * time/datestr.m: Avoid confusion for datenum vectors that are 6 + elements wide. + 2008-02-15 Timo Lindfors <timo.lindfors@iki.fi> * statistics/tests/kruskal_wallis_test.m: Handle ties.
--- a/scripts/time/datestr.m +++ b/scripts/time/datestr.m @@ -204,17 +204,17 @@ v = datevec (date, p); else v = []; - if columns (date) == 6 - ## make sure that the input really is a datevec - maxdatevec = [inf 12 31 23 59 60]; + if (columns (date) == 6) + ## Make sure that the input really is a datevec. + maxdatevec = [Inf, 12, 31, 23, 59, 60]; for i = 1:numel (maxdatevec) - if any (date(:,i) > maxdatevec(i)) + if (any (date(:,i) > maxdatevec(i))) v = datevec (date, p); break; endif endfor endif - if isempty (v) + if (isempty (v)) v = date; endif endif