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

## fr.gouv.culture.sdx.utils
Class Date

    java.lang.Object
      fr.gouv.culture.sdx.utils.Date

public class Date
extends java.lang.Object

Utility methods for handling dates in SDX.

Constructor Summary
`Date()`

Method Summary
`static java.lang.String` | `formatDate(java.util.Date date)` Formats a date as "yyyy/mm/dd hh:mm:ss".
`static java.lang.String` | `formatDate(java.util.Date date, java.lang.String format)` Formats a date according to the specified format.
`static java.lang.String` | `formatUtcISO8601Date()`
`static java.lang.String` | `formatUtcISO8601Date(java.util.Date date)`
`static java.util.Date` | `getUtcIso8601Date()`
`static java.util.Date` | `getUtcIso8601Date(java.util.Date date)`
`static java.util.Date` | `parseDate(java.lang.String str)` Parses a string as a date.
`static java.util.Date` | `parseUtcISO8601Date(java.lang.String str)`

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

Constructor Detail

### Date

    public Date()

Method Detail

### formatDate

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

  Formats a date as "yyyy/mm/dd hh:mm:ss".

  Parameters:
    `date` - The date to format.
  Returns:
    The formatted date.

### formatUtcISO8601Date

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

### formatUtcISO8601Date

    public static java.lang.String formatUtcISO8601Date()

### getUtcIso8601Date

    public static java.util.Date getUtcIso8601Date()

### getUtcIso8601Date

    public static java.util.Date getUtcIso8601Date(java.util.Date date)

### formatDate

    public static java.lang.String formatDate(java.util.Date date,
                                              java.lang.String format)

  Formats a date according to the specified format.

  Parameters:
    `date` - The date to format.
    `format` - The desired format.
  Returns:
    The formated date.

### parseUtcISO8601Date

    public static java.util.Date parseUtcISO8601Date(java.lang.String str)

### parseDate

    public static java.util.Date parseDate(java.lang.String str)

  Parses a string as a date. Several formats are available. The following ones will be checked in that order :

       		yyyy/mm/dd hh:mm:ss
       		yyyy-mm-dd hh:mm:ss
       		yyyy/mm/dd hh:mm
       		yyyy-mm-dd hh:mm
       		yyyy/mm/dd hh
       		yyyy-mm-dd hh
       		yyyy/mm/dd
       		yyyy-mm-dd
       		yyyy/mm
       		yyyy-mm
       		yyyy

  Parameters:
    `str` - The string to parse.
  Returns:
    A date, or `null` if the string can't be parsed as 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

Copyright © 2000-2003 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.