datestr bug

John W. Eaton jwe at bevo.che.wisc.edu
Thu Jul 24 08:24:32 CDT 2008


On 23-Jul-2008, Ben Abbott wrote:

| Another possible solution (hack) is to replace the offending line with
| 
|  nd  = strfind (str, "d");
|  nd  = setdiff (nd, strfind (str,"day"));
|  nd  = setdiff (nd, strfind (str,"dnesday"));
|  str(nd) = names_d{weekday (datenum (v(i,1), v(i,2), v(i,3)))};

I'm not applying this change because I think we should be able to come
up with a proper solution that is not just a band-aid kluge fix.

| In either event, an additional test should be added.
| 
| %!assert(datestr(testtime+[0 0 3 0 0 0],"dddd"),"Wednesday")
| 
| Comments?

I added this as an "xtest" that is expected to fail.

Thanks,

jwe


More information about the Bug-octave mailing list