de.esprit.appsuite.database.dbase

## Class DBDate

- java.lang.Object
- - java.util.Date
  - - java.sql.Date
    - - de.esprit.appsuite.database.dbase.DBDate

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<java.util.Date>

      public class DBDate
      extends java.sql.Date

  This is a extension of java.sql.Date which provides useful constructors. It also has the before() and after() methods overridden such that only date relevant fields (year and day) are evaluated (time fields are ignored).
  Author:
    Rainer Buesch
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DBDate()`
    `DBDate(java.util.Date date)`
    `DBDate(int year, int month, int day)`
    `DBDate(long date)`
    `DBDate(java.lang.String dateStr)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `after(java.util.Date when)`
    `boolean` | `before(java.util.Date when)`
    `boolean` | `equals(java.lang.Object obj)` Compares the fields DAY_OF_WEEK, MONTH, YEAR.
    `static java.text.DateFormat` | `getFormat()`
    `static java.lang.String` | `getFormatString()`
    `static DBDate` | `parseDateValue(java.lang.String dateStr)` Parses the dateStr to create a Date instance
    `static java.lang.String` | `toNeutralFormat(java.util.Date date)` Formats the time value according to 'yyyy-MM-dd'
    `static java.lang.String` | `toString(java.util.Date date)`

    - ### Methods inherited from class java.sql.Date

      `getHours, getMinutes, getSeconds, setHours, setMinutes, setSeconds, setTime, toString, valueOf`

    - ### Methods inherited from class java.util.Date

      `clone, compareTo, getDate, getDay, getMonth, getTime, getTimezoneOffset, getYear, hashCode, parse, setDate, setMonth, setYear, toGMTString, toLocaleString, UTC`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### DBDate

          public DBDate(long date)

    - #### DBDate

          public DBDate()

    - #### DBDate

          public DBDate(java.util.Date date)

    - #### DBDate

          public DBDate(int year,
                int month,
                int day)

    - #### DBDate

          public DBDate(java.lang.String dateStr)

  - ### Method Detail

    - #### equals

          public boolean equals(java.lang.Object obj)

      Compares the fields DAY_OF_WEEK, MONTH, YEAR.
      Overrides:
        `equals` in class `java.util.Date`

    - #### before

          public boolean before(java.util.Date when)

      Overrides:
        `before` in class `java.util.Date`

    - #### after

          public boolean after(java.util.Date when)

      Overrides:
        `after` in class `java.util.Date`

    - #### toString

          public static java.lang.String toString(java.util.Date date)

    - #### getFormatString

          public static java.lang.String getFormatString()

    - #### getFormat

          public static java.text.DateFormat getFormat()

    - #### parseDateValue

          public static DBDate parseDateValue(java.lang.String dateStr)
                                       throws java.text.ParseException

      Parses the dateStr to create a Date instance
      Throws:
        `java.text.ParseException`

    - #### toNeutralFormat

          public static java.lang.String toNeutralFormat(java.util.Date date)

      Formats the time value according to 'yyyy-MM-dd'

Copyright © 2014 EsprIT-Systems. All Rights Reserved.