Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.basex.query.xquery.item
Class Date

    java.lang.Object
      org.basex.query.xquery.expr.Expr
          org.basex.query.xquery.item.Item
              org.basex.query.xquery.item.Date

Direct Known Subclasses:
  Dat, Day, Dtm, Dur, MDa, Mon, Tim, Yea, YMo

    public abstract class Date

extends Item

Date container.

Author:
  Workgroup DBIS, University of Konstanz 2005-07, ISC License, Christian Gruen

Field Summary
`double` | `mil` Milliseconds.
`boolean` | `minus` Minus Flag.
`int` | `mon` Year and Month.
`long` | `sec` Day and Time.
`boolean` | `zone` Zone Flag.
`int` | `zshift` Zone Time.

Fields inherited from class org.basex.query.xquery.expr.Expr
`type`

Method Summary
`int` | `diff(Date d)` Compares two dates.
`int` | `diff(Item it)` Returns the difference between the current and the specified item.
`static long` | `dpm(int y, int m)` Returns days per month.
`boolean` | `eq(Item it)` Checks the items for equality.
`java.lang.String` | `toString()`

Methods inherited from class org.basex.query.xquery.item.Item
`bool, castErr, comp, dbl, eval, flt, i, info, iter, itr, serialize, serialize, size`

Methods inherited from class org.basex.query.xquery.expr.Expr
`cls, d, e, n, node, s, str, u`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### mil

    public double mil

  Milliseconds.

### minus

    public boolean minus

  Minus Flag.

### mon

    public int mon

  Year and Month.

### sec

    public long sec

  Day and Time.

### zone

    public boolean zone

  Zone Flag.

### zshift

    public int zshift

  Zone Time.

Method Detail

### diff

    public final int diff(Date d)

  Compares two dates.

  Parameters:
    `d` - date to be compared
  Returns:
    difference

### diff

    public int diff(Item it)
             throws XQException

  Description copied from class: `Item`
  Returns the difference between the current and the specified item.

  Overrides:
    `diff` in class `Item`
  Parameters:
    `it` - item to be compared.
  Returns:
    difference
  Throws:
    `XQException` - evaluation exception

### dpm

    public static long dpm(int y,
                           int m)

  Returns days per month.

  Parameters:
    `y` - year
    `m` - month
  Returns:
    days

### eq

    public final boolean eq(Item it)

  Description copied from class: `Item`
  Checks the items for equality.

  Specified by:
    `eq` in class `Item`
  Parameters:
    `it` - item to be compared.
  Returns:
    result of check

### toString

    public final java.lang.String toString()

  Overrides:
    `toString` in class `Item`

Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD