Class ISO8601Calendar

    • Constructor Detail

      • ISO8601Calendar

        public ISO8601Calendar​(Date date,
                               TimeZone tz)
        Constructor, sets the internal value to the given date/time.
        date - Date
        tz - optional timezone, default if UTC.
      • ISO8601Calendar

        public ISO8601Calendar​(String isodate)
                        throws NumberFormatException
        Constructor, parses date string.

        The String format may be one of

        • YYYY-MM-DDThh:mm:ss.sZ (UTC, timetone offset = 0)
        • YYYY-MM-DDThh:mm:ss.s+hh:mm
        • YYYY-MM-DDThh:mm:ss.s-hh:mm

        Parts from the right side (e.g. the whole time or the seconds) can be left out.

        isodate - Date string in ISO 8601 format.
        NumberFormatException - If the date format is invalid.
    • Method Detail

      • toString

        public String toString()
        Return the internal value as ISO 8601 date string in format YYYY-MM-DDThh:mm:ss.s+hh:mm
        toString in class Calendar
        a string representing the date