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 that this method modifies calendar by unsetting all time fields: calendar.setTime(DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED)
        Returns:
        new instance
        Throws:
        IllegalArgumentException - if calendar == null