commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <flame...@gmail.com>
Subject Re: FastDateFormat year bug
Date Sat, 11 Sep 2004 06:26:15 GMT
Sounds find to me. If no one says anything, I'll go ahead and put your
fix in (with a unit test, unless you've a patch for that) over the
weekend.

Hen

----- Original Message -----
From: Chua, Jerson (Exchange) <jchua@bear.com>
Date: Fri, 10 Sep 2004 14:22:44 -0400
Subject: FastDateFormat year bug
To: commons-dev@jakarta.apache.org

 
 

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; 

  

to 

  

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?

  

Thanks. 

  

Jerson 

  

  

  


***********************************************************************
Bear Stearns is not responsible for any recommendation, solicitation,
offer or agreement or any information about any transaction, customer
account or account activity contained in this communication.
***********************************************************************



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message