Class DateValue

    • Constructor Detail

      • DateValue

        public DateValue​(String date)
                  throws IllegalArgumentException
        Creates a new DateAttributeValue from a string representation of date
        Parameters:
        date - string representation of date
        Throws:
        IllegalArgumentException - if date is not a valid string representation of xs:date
    • Method Detail

      • getInstance

        public static DateValue getInstance​(XMLGregorianCalendar calendar)
                                     throws IllegalArgumentException
        Creates a new DateAttributeValue from a Calendar
        Parameters:
        calendar - a XMLGregorianCalendar object representing the specified date; beware this method creates an internal copy of calendar (to prevent modification of calendar and any external modification of the created instance's internal copy) before unsetting all time fields: calendarCopy.setTime(DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED)
        Returns:
        new instance
        Throws:
        IllegalArgumentException - if calendar == null