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

## com.sun.mdm.index.util
Class DateUtil

    java.lang.Object
      com.sun.mdm.index.util.DateUtil

public class DateUtil
extends java.lang.Object

Date utility functions

Field Summary
`(package private) static java.util.GregorianCalendar` | `cal`

Constructor Summary
`DateUtil()`

Method Summary
`static java.util.Date` | `getFirstDateOfMonth(java.util.Date dt)` Computes the first date of the month for the specified date.
`static java.util.Date` | `getFirstDateOfWeek(java.util.Date dt)` Computes the first date of the week for the specified date.
`static java.util.Date` | `getFirstDateOfYear(java.util.Date dt)` Computes the first date of the year for the specified date.
`static java.util.Date` | `getLastDateOfMonth(java.util.Date dt)` Computes the last date of the month for the specified date.
`static java.util.Date` | `getLastDateOfYear(java.util.Date dt)` Computes the last date of the year for the specified date.
`static java.lang.String` | `getMonth(java.util.Date dt)` Get month string for the specified date.
`static java.lang.String` | `getYear(java.util.Date dt)` Get year string for the specified date.

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

Field Detail

### cal

    static java.util.GregorianCalendar cal

Constructor Detail

### DateUtil

    public DateUtil()

Method Detail

### getFirstDateOfMonth

    public static java.util.Date getFirstDateOfMonth(java.util.Date dt)

  Computes the first date of the month for the specified date.

  Parameters:
    `dt` - Specified date.
  Returns:
    The first date of the month for the specified date.

### getFirstDateOfWeek

    public static java.util.Date getFirstDateOfWeek(java.util.Date dt)

  Computes the first date of the week for the specified date.

  Parameters:
    `dt` - Specified date.
  Returns:
    The first date of the week for the specified date.

### getFirstDateOfYear

    public static java.util.Date getFirstDateOfYear(java.util.Date dt)

  Computes the first date of the year for the specified date.

  Parameters:
    `dt` - Specified date.
  Returns:
    The first date of the year for the specified date.

### getLastDateOfMonth

    public static java.util.Date getLastDateOfMonth(java.util.Date dt)

  Computes the last date of the month for the specified date.

  Parameters:
    `dt` - Specified date.
  Returns:
    The last date of the month for the specified date.

### getLastDateOfYear

    public static java.util.Date getLastDateOfYear(java.util.Date dt)

  Computes the last date of the year for the specified date.

  Parameters:
    `dt` - Specified date.
  Returns:
    The last date of the year for the specified date.

### getMonth

    public static java.lang.String getMonth(java.util.Date dt)

  Get month string for the specified date.

  Parameters:
    `dt` - Specified date.
  Returns:
    The month string of specified date

### getYear

    public static java.lang.String getYear(java.util.Date dt)

  Get year string for the specified date.

  Parameters:
    `dt` - Specified date.
  Returns:
    The year string of specified date.

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

Sun Microsystems, Inc.