wt.query
Class DateHelper

java.lang.Object
  extended bywt.query.DateHelper
All Implemented Interfaces:
Serializable

public class DateHelper
extends Object
implements Serializable

Parses a string date into a DateHelper object which contains a date object and records the last significant digit of the date or time. This facilitates queries to the last signigicant digit. For example find all objects created on the following day or hour etc.

See Also:
Serialized Form

Field Summary
(package private)  int[] cal_constants
           
private static String CLASSNAME
           
 Date date
           
static int firstInstant
           
 int last_digit
           
static int lastInstant
           
static int NONE
           
private static String RESOURCE
           
private static String versionID
           
 
Constructor Summary
DateHelper(String date_string)
           
DateHelper(String date_string, Locale locale)
           
DateHelper(String date_string, String bundle_format)
           
DateHelper(String date_string, String bundle_format, Locale locale)
           
DateHelper(String date_string, TimeZone tz)
           
DateHelper(String date_string, TimeZone tz, Locale locale)
           
 
Method Summary
 void dateEquals(Date toDate, Date fromDate)
           
 void dateGreater(Date toDate)
           
 void dateLess(Date toDate)
           
 boolean fullDate()
           
 Date getDate()
           
 Date instantOfDate(int range_side)
           
protected  boolean isYearValid(Date date, String date_string)
          Tests to see if the year in the parsed date is actually in the string that the user entered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

versionID

private static final String versionID
See Also:
Constant Field Values

cal_constants

int[] cal_constants

lastInstant

public static int lastInstant

firstInstant

public static int firstInstant

NONE

public static int NONE

date

public Date date

last_digit

public int last_digit
Constructor Detail

DateHelper

public DateHelper(String date_string)
           throws WTPropertyVetoException

DateHelper

public DateHelper(String date_string,
                  TimeZone tz)
           throws WTPropertyVetoException

DateHelper

public DateHelper(String date_string,
                  Locale locale)
           throws WTPropertyVetoException

DateHelper

public DateHelper(String date_string,
                  TimeZone tz,
                  Locale locale)
           throws WTPropertyVetoException

DateHelper

public DateHelper(String date_string,
                  String bundle_format)
           throws WTPropertyVetoException

DateHelper

public DateHelper(String date_string,
                  String bundle_format,
                  Locale locale)
           throws WTPropertyVetoException
Method Detail

isYearValid

protected boolean isYearValid(Date date,
                              String date_string)
Tests to see if the year in the parsed date is actually in the string that the user entered. The year must be 4-digit. Supported API: false


fullDate

public boolean fullDate()

getDate

public Date getDate()

instantOfDate

public Date instantOfDate(int range_side)

dateEquals

public void dateEquals(Date toDate,
                       Date fromDate)

dateGreater

public void dateGreater(Date toDate)

dateLess

public void dateLess(Date toDate)