org.whattf.datatype
Class AbstractDatetime
java.lang.Object
org.whattf.datatype.AbstractDatatype
org.whattf.datatype.AbstractDatetime
- All Implemented Interfaces:
- Datatype
- Direct Known Subclasses:
- Date, DateOrTime, DateOrTimeContent, Datetime, DatetimeLocal, DatetimeTz, Time
abstract class AbstractDatetime
- extends AbstractDatatype
Superclass for various datetime datatypes.
- Version:
- $Id: AbstractDatetime.java,v 1.8 2006/11/26 14:22:54 hsivonen Exp $
- Author:
- hsivonen
Field Summary |
private static int[] |
DAYS_IN_MONTHS
Days in monts on non-leap years. |
Methods inherited from class org.whattf.datatype.AbstractDatatype |
checkValid, createStreamingValidator, createValue, getIdType, isContextDependent, isValid, isWhitespace, sameValue, toAsciiLowerCase, toAsciiLowerCase, valueHashCode |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DAYS_IN_MONTHS
private static int[] DAYS_IN_MONTHS
- Days in monts on non-leap years.
AbstractDatetime
AbstractDatetime()
- Constructor.
checkDate
private void checkDate(String year,
String month,
String day)
throws DatatypeException
- Throws:
DatatypeException
checkDate
private void checkDate(int year,
int month,
int day)
throws DatatypeException
- Throws:
DatatypeException
isLeapYear
private boolean isLeapYear(int year)
checkHour
protected final void checkHour(String hour)
throws DatatypeException
- Throws:
DatatypeException
checkHour
private void checkHour(int hour)
throws DatatypeException
- Throws:
DatatypeException
checkMinute
protected final void checkMinute(String minute)
throws DatatypeException
- Throws:
DatatypeException
checkMinute
private void checkMinute(int minute)
throws DatatypeException
- Throws:
DatatypeException
checkSecond
protected final void checkSecond(String second)
throws DatatypeException
- Throws:
DatatypeException
checkSecond
private void checkSecond(int second)
throws DatatypeException
- Throws:
DatatypeException
checkTzd
private void checkTzd(String hours,
String minutes)
throws DatatypeException
- Throws:
DatatypeException
checkTzd
private void checkTzd(int hours,
int minutes)
throws DatatypeException
- Throws:
DatatypeException
getPattern
protected abstract Pattern getPattern()
checkValid
public void checkValid(CharSequence literal)
throws DatatypeException
- Specified by:
checkValid
in class AbstractDatatype
- Throws:
DatatypeException