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

## org.apache.xmlgraphics.util
Class DateFormatUtil

    java.lang.Object
      org.apache.xmlgraphics.util.DateFormatUtil

    public final class DateFormatUtil

extends Object

Method Summary
`static String` | `formatISO8601(Date date, TimeZone timeZone)` Formats the date according to ISO 8601 standard.
`static String` | `formatPDFDate(Date date, TimeZone timeZone)` Formats the date according to PDF format.
`static Date` | `parseISO8601Date(String date)` Parses an ISO 8601 date and time value.

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

Method Detail

### formatPDFDate

    public static String formatPDFDate(Date date,
                                       TimeZone timeZone)

  Formats the date according to PDF format. See section 3.8.2 of the PDF 1.4 specification.

  Parameters:
    `date` - The date time to format
    `timeZone` - The time zone used to format the date
  Returns:
    a formatted date according to PDF format (based on ISO 8824)

### formatISO8601

    public static String formatISO8601(Date date,
                                       TimeZone timeZone)

  Formats the date according to ISO 8601 standard.

  Parameters:
    `date` - The date time to format
    `timeZone` - The time zone used to format the date
  Returns:
    a formatted date according to ISO 8601

### parseISO8601Date

    public static Date parseISO8601Date(String date)

  Parses an ISO 8601 date and time value.

  Parameters:
    `date` - the date and time value as an ISO 8601 string
  Returns:
    the parsed date/time

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

Copyright 1999-2017 The Apache Software Foundation. All Rights Reserved.