com.standbysoft.component.date
Class DefaultDateParser
java.lang.Object
com.standbysoft.component.date.DefaultDateParser
- All Implemented Interfaces:
- DateParser
- public class DefaultDateParser
- extends java.lang.Object
- implements DateParser
The default date parser tries to determine the date using a specified date format.
|
Method Summary |
java.util.Date |
parse(java.lang.String text,
java.util.Date reference,
java.text.DateFormat format)
Determines the date represented by a specified text, using a certain date format. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultDateParser
public DefaultDateParser()
parse
public java.util.Date parse(java.lang.String text,
java.util.Date reference,
java.text.DateFormat format)
throws DateParserException
- Determines the date represented by a specified text, using a certain date format.
This means that if the text does not represent a date according to the date format,
it cannot be parsed to produce a date and an
DateParserException is thrown.
- Specified by:
parse in interface DateParser
- Parameters:
text - text representation of the datereference - not used by this implementationformat - date format used to determine the date from its text representation
- Returns:
- date parsed from its text representation using the specified format.
- Throws:
DateParserException - if the parsed text does not match a date
Visit www.jdatepicker.com for further information or send us your suggestions.
Copyright © 2003-2007 Stand By Soft Ltd. All Rights Reserved.