From: Paul K. <pki...@us...> - 2005-06-12 14:42:56
|
On Jun 9, 2005, at 8:58 PM, Keith Goodman wrote: > Crap. Now I crashed on the format of 'mm'. I would have submitted it > all at once had I known. > > $ diff -u datestr.m datestr2.m > --- datestr.m 2005-06-09 17:49:14.677736696 -0700 > +++ datestr2.m 2005-06-09 17:49:31.562169872 -0700 > @@ -25,7 +25,7 @@ > ## @item 2 @tab mm/dd/yy @tab 09/07/00 > ## @item 3 @tab mmm @tab Sep > ## @item 4 @tab m @tab S > -## @item 5 @tab mm @tab 9 > +## @item 5 @tab mm @tab 09 > ## @item 6 @tab mm/dd @tab 09/07 > ## @item 7 @tab dd @tab 07 > ## @item 8 @tab ddd @tab Thu > @@ -124,7 +124,7 @@ > case { 4, 'm' } > str = sprintf("%s",__month_names(M,1)); > case { 5, 'mm' } > - str = sprintf("%d",M); > + str = sprintf("%02d",M); > case { 6, 'mm/dd' } > str = sprintf("%02d/%02d",M,D); > case { 7, 'dd' } Applied. Note that the 5.2 documentation on the web gives the example of '3' for format 'mm'. Was the documentation wrong or has the definition changed? Is there any way we can support scripts written for older versions? Even if there were, should we bother? Maintaining compatibility with a language which doesn't even stay compatible with itself is frustrating. - Paul |