public class XmppDateTime extends Object
Constructor and Description |
---|
XmppDateTime() |
Modifier and Type | Method and Description |
---|---|
static String |
asString(TimeZone timeZone)
Converts a time zone to the String format as specified in XEP-0082.
|
static String |
convertRfc822TimezoneToXep82(String dateString)
Convert a RFC 822 Timezone to the Timezone format used in XEP-82.
|
static String |
convertXep82TimezoneToRfc822(String dateString)
Converts a XEP-0082 date String's time zone definition into a RFC822 time
zone definition.
|
static String |
formatXEP0082Date(Date date)
Formats a Date into a XEP-0082 - XMPP Date and Time Profiles string.
|
static Date |
parseDate(String dateString)
Parses the given date string in either of the three profiles of XEP-0082 - XMPP Date and
Time Profiles or XEP-0091 - Legacy Delayed
Delivery format.
|
static Date |
parseXEP0082Date(String dateString)
Parses the given date string in the XEP-0082 - XMPP Date and
Time Profiles.
|
public XmppDateTime()
public static Date parseXEP0082Date(String dateString) throws ParseException
dateString
- the date string to parseParseException
- if the specified string cannot be parsedpublic static Date parseDate(String dateString) throws ParseException
This method uses internal date formatters and is thus threadsafe.
dateString
- the date string to parseParseException
- if the specified string cannot be parsedpublic static String formatXEP0082Date(Date date)
date
- the time value to be formatted into a time stringpublic static String convertXep82TimezoneToRfc822(String dateString)
dateString
- the date String.public static String convertRfc822TimezoneToXep82(String dateString)
dateString
- the input date String.