Mercurial > octave-nkf
diff scripts/time/datevec.m @ 19630:0e1f5a750d00
maint: Periodic merge of gui-release to default.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 20 Jan 2015 10:24:46 -0500 |
parents | 9464cfeede2b 446c46af4b42 |
children | 4197fc428c7d |
line wrap: on
line diff
--- a/scripts/time/datevec.m Tue Jan 20 09:55:41 2015 -0500 +++ b/scripts/time/datevec.m Tue Jan 20 10:24:46 2015 -0500 @@ -248,20 +248,20 @@ function [found, y, m, d, h, mi, s] = __date_str2vec__ (ds, p, f, rY, ry, fy, fm, fd, fh, fmi, fs) idx = strfind (f, "FFF"); - if (! isempty (idx)) + if (! isempty (idx)) ## Kludge to handle FFF millisecond format since strptime does not - f(idx:idx+2) = []; + f(idx:idx+2) = []; [~, nc] = strptime (ds, f); if (nc > 0) - msec = ds(nc:min(nc+2, end)); - f = [f(1:idx-1) msec f(idx:end)]; + msec = ds(nc:min(nc+2, end)); + f = [f(1:idx-1) msec f(idx:end)]; [tm, nc] = strptime (ds, f); tm.usec = 1000 * str2double (msec); endif else [tm, nc] = strptime (ds, f); endif - + if (nc == columns (ds) + 1) found = true; y = tm.year + 1900; m = tm.mon + 1; d = tm.mday;