Mercurial > octave-antonio
comparison scripts/time/datestr.m @ 11329:6b073da9d7fc
ChangeLog fix and new datestr test omitted from previous change
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 09 Dec 2010 02:42:29 -0500 |
parents | f286a874617c |
children | c776f063fefe |
comparison
equal
deleted
inserted
replaced
11328:f286a874617c | 11329:6b073da9d7fc |
---|---|
334 %!assert(datestr(testtime,31),"2005-12-18 02:33:17"); | 334 %!assert(datestr(testtime,31),"2005-12-18 02:33:17"); |
335 %!assert(datestr(testtime+[0 0 3 0 0 0],"dddd"),"Wednesday") | 335 %!assert(datestr(testtime+[0 0 3 0 0 0],"dddd"),"Wednesday") |
336 ## avoid the bug where someone happens to give a vector of datenums that | 336 ## avoid the bug where someone happens to give a vector of datenums that |
337 ## happens to be 6 wide | 337 ## happens to be 6 wide |
338 %!assert(datestr(733452.933:733457.933), ["14-Feb-2008 22:23:31";"15-Feb-2008 22:23:31";"16-Feb-2008 22:23:31";"17-Feb-2008 22:23:31";"18-Feb-2008 22:23:31";"19-Feb-2008 22:23:31"]) | 338 %!assert(datestr(733452.933:733457.933), ["14-Feb-2008 22:23:31";"15-Feb-2008 22:23:31";"16-Feb-2008 22:23:31";"17-Feb-2008 22:23:31";"18-Feb-2008 22:23:31";"19-Feb-2008 22:23:31"]) |
339 %!assert (datestr ([1944, 6, 6, 6, 30, 0], 0), "06-Jun-1944 06:30:00"); | |
340 | |
339 # demos | 341 # demos |
340 %!demo | 342 %!demo |
341 %! datestr (now ()) | 343 %! datestr (now ()) |
342 %!demo | 344 %!demo |
343 %! datestr (rem (now (), 1)) | 345 %! datestr (rem (now (), 1)) |