aspose file tools*
The moose likes Java in General and the fly likes DateFormat.isLenient() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "DateFormat.isLenient()" Watch "DateFormat.isLenient()" New topic
Author

DateFormat.isLenient()

Viet Jav
Ranch Hand

Joined: Dec 27, 2001
Posts: 55
Please explain usage method isLenient() in package java.text.DateFormat; and if possible give me a code about this method.
Thanks.
Lam nguyen.
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
By default isLenient() is true which means that if the String in the parse() method isn't exactly in the right format it will still try to get a date from it. If setLenient(false) then the string must be in exactly the format defined by the DateFormat object.


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: DateFormat.isLenient()
 
Similar Threads
Finalization Method
NX: When should I throw DuplicateKeyException?
garbage collection
Changin font in a JTextArea
Sharpen your Pencil - Page 323 in HFEJB