Mercurial > hg > octave-lyh
diff scripts/time/datestr.m @ 7493:f1bce8450fd0
[mq]: tmp-patch
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 19 Feb 2008 03:36:08 -0500 |
parents | bd1168732c95 |
children | 4f9e8eeb2059 |
line wrap: on
line diff
--- 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