commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chua, Jerson \(Exchange\)" <>
Subject FastDateFormat year bug
Date Fri, 10 Sep 2004 18:22:44 GMT
Hi to all,


I used FastDateFormat to convert a date object to string using this
pattern yyyy-MM-dd.

No zeros are padded if I my year is 0001.


I'm getting 1-01-01.


After looking through the code, I replaced line 498 


rule = UnpaddedNumberField.INSTANCE_YEAR;




rule = selectNumberRule(Calendar.YEAR, tokenLen);


And it fixed the problem. 


Is the current behavior a feature (by design) or a bug? If it's a bug,
can we put my change in?








View raw message