Class XmppDateTime

    • Method Detail

      • formatXEP0082Date

        public static String formatXEP0082Date​(Date date)
        Formats a Date into a XEP-0082 - XMPP Date and Time Profiles string.
        Parameters:
        date - the time value to be formatted into a time string
        Returns:
        the formatted time string in XEP-0082 format
      • convertXep82TimezoneToRfc822

        public static String convertXep82TimezoneToRfc822​(String dateString)
        Converts a XEP-0082 date String's time zone definition into a RFC822 time zone definition. The major difference is that XEP-0082 uses a smicolon between hours and minutes and RFC822 does not.
        Parameters:
        dateString - the date String.
        Returns:
        the String with converted timezone
      • convertRfc822TimezoneToXep82

        public static String convertRfc822TimezoneToXep82​(String dateString)
        Convert a RFC 822 Timezone to the Timezone format used in XEP-82.
        Parameters:
        dateString - the input date String.
        Returns:
        the input String with the timezone converted to XEP-82.
      • asString

        public static String asString​(TimeZone timeZone)
        Converts a time zone to the String format as specified in XEP-0082.
        Parameters:
        timeZone - the time zone to convert.
        Returns:
        the String representation of the TimeZone