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

## com.google.appengine.api.search
Class DateUtil

    java.lang.Object
      com.google.appengine.api.search.DateUtil

    public final class DateUtil

extends java.lang.Object

A utility class that centralizes processing of dates.

Field Summary
`static java.util.Date` | `MAX_DATE` The maximum date that can be stored in a date field.
`static java.util.Date` | `MIN_DATE` The minimum date that can be stored in a date field.

Method Summary
`static java.util.Date` | `deserializeDate(java.lang.String date)` Converts a string containing the milliseconds since the UNIX Epoch into a Date.
`static java.lang.String` | `formatDateTime(java.util.Date date)` Formats a date according ISO 8601 full date time format.
`static java.lang.String` | `serializeDate(java.util.Date date)` Converts date into a string containing the milliseconds since the UNIX Epoch.

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

Field Detail

### MAX_DATE

    public static final java.util.Date MAX_DATE

  The maximum date that can be stored in a date field.

### MIN_DATE

    public static final java.util.Date MIN_DATE

  The minimum date that can be stored in a date field.

Method Detail

### formatDateTime

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

  Formats a date according ISO 8601 full date time format. Currently, this is used to print dates for error messages.

  Parameters:
    `date` - the date to format as a string
  Returns:
    a string representing the date in ISO 8601 format

### serializeDate

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

  Converts date into a string containing the milliseconds since the UNIX Epoch.

  Parameters:
    `date` - the date to serialize as a string
  Returns:
    a string representing the date as milliseconds since the UNIX Epoch

### deserializeDate

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

  Converts a string containing the milliseconds since the UNIX Epoch into a Date. Two formats of date string are supported: "yyyy-MM-dd" and a long. Eventually, the "yyyy-MM-dd" format support will be removed.

  Parameters:
    `date` - the date string to deserialize into a date
  Returns:
    a date

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