JDatePicker v4.3

com.standbysoft.component.date
Class DefaultDateParser

java.lang.Object
  extended bycom.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.


Constructor Summary
DefaultDateParser()
           
 
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
 

Constructor Detail

DefaultDateParser

public DefaultDateParser()
Method Detail

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 date
reference - not used by this implementation
format - 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

JDatePicker v4.3

Visit www.jdatepicker.com for further information or send us your suggestions.

Copyright © 2003-2007 Stand By Soft Ltd. All Rights Reserved.