public final class DateUtil
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
static java.util.TimeZone |
UTC |
| Constructor | Description |
|---|---|
DateUtil() |
| Modifier and Type | Method | Description |
|---|---|---|
static java.text.SimpleDateFormat |
createIso8601Format() |
|
static java.text.SimpleDateFormat |
createRfc2822Format() |
|
static java.lang.String |
formatIso8601(java.util.Date date) |
Format a date to in ISO 8601 format (as used by GIT) adjusted to UTC timezone.
|
static java.lang.String |
formatRfc2822(java.util.Date date) |
Format a date to in RFC 2822 format (as used by GIT) adjusted to UTC timezone.
|
static java.util.Date |
parseIso8601(java.lang.String rawstr) |
public static java.text.SimpleDateFormat createIso8601Format()
public static java.text.SimpleDateFormat createRfc2822Format()
public static java.lang.String formatIso8601(java.util.Date date)
public static java.lang.String formatRfc2822(java.util.Date date)
public static java.util.Date parseIso8601(java.lang.String rawstr)
throws java.text.ParseException
java.text.ParseExceptionCopyright © 1995–2019 Mort Bay Consulting. All rights reserved.