public class XmppDateTime
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
XmppDateTime.DateFormatType |
Constructor and Description |
---|
XmppDateTime() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
asString(java.util.TimeZone timeZone)
Converts a time zone to the String format as specified in XEP-0082
|
static java.lang.String |
convertRfc822TimezoneToXep82(java.lang.String dateString) |
static java.lang.String |
convertXep82TimezoneToRfc822(java.lang.String dateString)
Converts a XEP-0082 date String's time zone definition into a RFC822 time zone definition.
|
static java.lang.String |
formatXEP0082Date(java.util.Date date)
Formats a Date into a XEP-0082 - XMPP Date and Time Profiles string.
|
static java.util.Date |
parseDate(java.lang.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 java.util.Date |
parseXEP0082Date(java.lang.String dateString)
Deprecated.
Use
parseDate(String) instead. |
public static java.util.Date parseXEP0082Date(java.lang.String dateString) throws java.text.ParseException
parseDate(String)
instead.dateString
- the date string to parsejava.text.ParseException
- if the specified string cannot be parsedpublic static java.util.Date parseDate(java.lang.String dateString) throws java.text.ParseException
This method uses internal date formatters and is thus threadsafe.
dateString
- the date string to parsejava.text.ParseException
- if the specified string cannot be parsedpublic static java.lang.String formatXEP0082Date(java.util.Date date)
date
- the time value to be formatted into a time stringpublic static java.lang.String convertXep82TimezoneToRfc822(java.lang.String dateString)
dateString
- public static java.lang.String convertRfc822TimezoneToXep82(java.lang.String dateString)
public static java.lang.String asString(java.util.TimeZone timeZone)
timeZone
-