@ComponentSpecification public interface Iso8601UtilLimited
Iso8601Util
that is GWT compatible.Iso8601Util
Modifier and Type | Field and Description |
---|---|
static String |
PATTERN_STRING_ALL
The regex-pattern for the full date-format (date with optional time and optional timezone).
|
static String |
PATTERN_STRING_DATE
The regex-pattern for the date-format.
|
static String |
PATTERN_STRING_TIME
The regex-pattern for the time-format.
|
static String |
PATTERN_STRING_TIMEZONE
The regex-pattern for the timezone-format.
|
Modifier and Type | Method and Description |
---|---|
String |
formatDate(Date date)
This method formats the given
date in the format "yyyy-MM-dd" in GMT according to ISO 8601 . |
String |
formatDate(Date date,
boolean extended)
This method formats the given
calendar as a date in the format "yyyy-MM-dd" according to
ISO 8601 . |
void |
formatDate(Date date,
boolean extended,
Appendable buffer)
This method formats the given
date as a date according to ISO 8601 . |
String |
formatDateTime(Date date)
This method formats the given
date as a date and time in the format "yyyy-MM-ddTHH:mm:ssZ" (UTC) according
to ISO 8601 . |
String |
formatDateTime(Date date,
boolean extendedDate,
boolean extendedTime,
boolean extendedTimezone)
This method formats the given
date as a date according to ISO 8601 . |
void |
formatDateTime(Date date,
boolean extendedDate,
boolean extendedTime,
boolean extendedTimezone,
Appendable buffer)
This method formats the given
date as a date and time according to ISO 8601 . |
void |
formatTime(Date date,
boolean extended,
Appendable buffer)
This method formats the given
date as time according to ISO 8601 . |
void |
formatTimeZone(int timezoneOffset,
boolean extended,
Appendable buffer)
This method formats the given
timezone according to ISO 8601 . |
Date |
parseDate(String date)
This method parses the given string
date according to ISO 8601 . |
static final String PATTERN_STRING_DATE
static final String PATTERN_STRING_TIME
static final String PATTERN_STRING_TIMEZONE
static final String PATTERN_STRING_ALL
String formatDate(Date date)
date
in the format "yyyy-MM-dd" in GMT according to ISO 8601
.date
- is the Date
to format.date
as date string.String formatDate(Date date, boolean extended)
calendar
as a date in the format "yyyy-MM-dd" according to
ISO 8601
.date
- is the Date
to format.extended
- if false
the basic format ("yyyyMMdd") is used, if true
the extended format
("yyyy-MM-dd") is used.calendar
as date string.void formatDate(Date date, boolean extended, Appendable buffer)
date
as a date according to ISO 8601
.date
- is the Date
to format.extended
- if false
the basic date format ("yyyyMMdd") is used, if true
the extended date
format ("yyyy-MM-dd") is used.buffer
- is where to append the formatted date.String formatDateTime(Date date)
date
as a date and time in the format "yyyy-MM-ddTHH:mm:ssZ" (UTC) according
to ISO 8601
.date
- is the date to format.calendar
as date string.String formatDateTime(Date date, boolean extendedDate, boolean extendedTime, boolean extendedTimezone)
date
as a date according to ISO 8601
.date
- is the Date
to format.extendedDate
- if false
the basic date format ("yyyyMMdd") is used, if true
the extended date
format ("yyyy-MM-dd") is used.extendedTime
- if false
the basic time format ("HHmmss") is used, if true
the extended time
format ("HH:mm:ss") is used.extendedTimezone
- if false
the basic timezone format ("±HHmm[ss]") is used, if true
the
extended timezone format ("±HH:mm[:ss]") is used.calendar
as date string.void formatDateTime(Date date, boolean extendedDate, boolean extendedTime, boolean extendedTimezone, Appendable buffer)
date
as a date and time according to ISO 8601
.date
- is the Date
to format.extendedDate
- if false
the basic date format ("yyyyMMdd") is used, if true
the extended date
format ("yyyy-MM-dd") is used.extendedTime
- if false
the basic time format ("HHmmss") is used, if true
the extended time
format ("HH:mm:ss") is used.extendedTimezone
- if false
the basic timezone format ("±HHmm[ss]") is used, if true
the
extended timezone format ("±HH:mm[:ss]") is used.buffer
- is where to append the formatted date and time.void formatTime(Date date, boolean extended, Appendable buffer)
date
as time according to ISO 8601
.date
- is the Date
to format.extended
- if false
the basic time format ("HHmmss") is used, if true
the extended time format
("HH:mm:ss") is used.buffer
- is where to append the formatted date.void formatTimeZone(int timezoneOffset, boolean extended, Appendable buffer)
timezoneOffset
- is the timezone-offset in milliseconds.extended
- - if false
the basic timezone format ("±HHmm[ss]") is used, if true
the
extended timezone format ("±HH:mm[:ss]") is used.buffer
- is where to append the formatted timezone.Copyright © 2001–2016 mmm-Team. All rights reserved.