public XMLGregorianCalendar newXMLGregorianCalendarDate (int year, int month, int day, int timezone)

Create a Java representation of XML Schema builtin datatype date or g*.

For example, an instance of gYear can be created invoking this factory with month and day parameters set to DatatypeConstants.FIELD_UNDEFINED.

A DatatypeConstants.FIELD_UNDEFINED value indicates that field is not set.

Parameters:
year    of XMLGregorianCalendar to be created.
month    of XMLGregorianCalendar to be created.
day    of XMLGregorianCalendar to be created.
timezone    offset in minutes. DatatypeConstants.FIELD_UNDEFINED indicates optional field is not set.

Returns:  XMLGregorianCalendar created from parameter values.

Exceptions:
IllegalArgumentException    If any individual parameter's value is outside the maximum value constraint for the field as determined by the Date/Time Data Mapping table in XMLGregorianCalendar or if the composite values constitute an invalid XMLGregorianCalendar instance as determined by XMLGregorianCalendar.isValid().

See also:
DatatypeConstants.FIELD_UNDEFINED