dcsimg
2/29 is not 3/1
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   John_Zukowski
Posted On:   Friday, March 23, 2001 08:16 AM

When converting a string to a date, how do I prevent date parsing from converting 2/29/01 to 3/1/01?

Re: 2/29 is not 3/1

Posted By:   Christopher_Schultz  
Posted On:   Thursday, April 5, 2001 08:22 AM

Is there a real reason to prevent that from happening? February 2001 only has 28 days...



Alternately, you could print out the date yourself, rather than using java.text.DateFormat.



-chris

Re: 2/29 is not 3/1

Posted By:   John_Zukowski  
Posted On:   Friday, March 23, 2001 08:17 AM

When using DateFormat, you can set the lenient property to false so that it doesn't try to guess at what date it thought you were thinking.
About | Sitemap | Contact