Javax.Xml.Datatype.XMLGregorianCalendar Class
Date/Time Datatype Field Mapping Between XML Schema 1.0 and Java Representation
XML Schema 1.0

datatype

field
Related

XMLGregorianCalendar

Accessor(s)
Value Range
year XMLGregorianCalendar.Year + XMLGregorianCalendar.Eon or

XMLGregorianCalendar.EonAndYear
getYear() is a value between -(10^9-1) to (10^9)-1 or DatatypeConstants.FieldUndefined.

XMLGregorianCalendar.Eon is high order year value in billion of years.
getEon() has values greater than or equal to (10^9) or less than or equal to -(10^9). A value of null indicates field is undefined.
Given that states that the year zero will be a valid lexical value in a future version of XML Schema, this class allows the year field to be set to zero. Otherwise, the year field value is handled exactly as described in the errata and [ISO-8601-1988]. Note that W3C XML Schema 1.0 validation does not allow for the year field to have a value of zero.
month XMLGregorianCalendar.Month 1 to 12 or DatatypeConstants.FieldUndefined
day XMLGregorianCalendar.Day Independent of month, max range is 1 to 31 or DatatypeConstants.FieldUndefined.

The normative value constraint stated relative to month field's value is in .
hourXMLGregorianCalendar.Hour 0 to 24 or DatatypeConstants.FieldUndefined. For a value of 24, the minute and second field must be zero per .
minute XMLGregorianCalendar.Minute 0 to 59 or DatatypeConstants.FieldUndefined
secondXMLGregorianCalendar.Second + XMLGregorianCalendar.Millisecond/1000 or

XMLGregorianCalendar.Second + XMLGregorianCalendar.FractionalSecond
XMLGregorianCalendar.Second from 0 to 60 or DatatypeConstants.FieldUndefined.

(Note: 60 only allowable for leap second.)

XMLGregorianCalendar.FractionalSecond allows for infinite precision over the range from 0.0 to 1.0 when the XMLGregorianCalendar.Second is defined.

FractionalSecond is optional and has a value of null when it is undefined.

XMLGregorianCalendar.Millisecond is the convenience millisecond precision of value of XMLGregorianCalendar.FractionalSecond.
timezone XMLGregorianCalendar.Timezone Number of minutes or DatatypeConstants.FieldUndefined. Value range from -14 hours (-14 * 60 minutes) to 14 hours (14 * 60 minutes).

See Also: XMLGregorianCalendar Members

Syntax

[Android.Runtime.Register("javax/xml/datatype/XMLGregorianCalendar", DoNotGenerateAcw=true)]
public abstract class XMLGregorianCalendar : Java.Lang.Object, Java.Lang.ICloneable, IDisposable

Remarks

Date/Time Datatype Field Mapping Between XML Schema 1.0 and Java Representation
XML Schema 1.0

datatype

field
Related

XMLGregorianCalendar

Accessor(s)
Value Range
year XMLGregorianCalendar.Year + XMLGregorianCalendar.Eon or

XMLGregorianCalendar.EonAndYear
getYear() is a value between -(10^9-1) to (10^9)-1 or DatatypeConstants.FieldUndefined.

XMLGregorianCalendar.Eon is high order year value in billion of years.
getEon() has values greater than or equal to (10^9) or less than or equal to -(10^9). A value of null indicates field is undefined.
Given that states that the year zero will be a valid lexical value in a future version of XML Schema, this class allows the year field to be set to zero. Otherwise, the year field value is handled exactly as described in the errata and [ISO-8601-1988]. Note that W3C XML Schema 1.0 validation does not allow for the year field to have a value of zero.
month XMLGregorianCalendar.Month 1 to 12 or DatatypeConstants.FieldUndefined
day XMLGregorianCalendar.Day Independent of month, max range is 1 to 31 or DatatypeConstants.FieldUndefined.

The normative value constraint stated relative to month field's value is in .
hourXMLGregorianCalendar.Hour 0 to 24 or DatatypeConstants.FieldUndefined. For a value of 24, the minute and second field must be zero per .
minute XMLGregorianCalendar.Minute 0 to 59 or DatatypeConstants.FieldUndefined
secondXMLGregorianCalendar.Second + XMLGregorianCalendar.Millisecond/1000 or

XMLGregorianCalendar.Second + XMLGregorianCalendar.FractionalSecond
XMLGregorianCalendar.Second from 0 to 60 or DatatypeConstants.FieldUndefined.

(Note: 60 only allowable for leap second.)

XMLGregorianCalendar.FractionalSecond allows for infinite precision over the range from 0.0 to 1.0 when the XMLGregorianCalendar.Second is defined.

FractionalSecond is optional and has a value of null when it is undefined.

XMLGregorianCalendar.Millisecond is the convenience millisecond precision of value of XMLGregorianCalendar.FractionalSecond.
timezone XMLGregorianCalendar.Timezone Number of minutes or DatatypeConstants.FieldUndefined. Value range from -14 hours (-14 * 60 minutes) to 14 hours (14 * 60 minutes).

Representation for W3C XML Schema 1.0 date/time datatypes. Specifically, these date/time datatypes are , , , , , and defined in the XML Namespace "http://www.w3.org/2001/XMLSchema". These datatypes are normatively defined in .

The table below defines the mapping between XML Schema 1.0 date/time datatype fields and this class' fields. It also summarizes the value constraints for the date and time fields defined in .

All maximum value space constraints listed for the fields in the table above are checked by factory methods, @{link DatatypeFactory}, setter methods and parse methods of this class. IllegalArgumentException is thrown when a parameter's value is outside the value constraint for the field or if the composite values constitute an invalid XMLGregorianCalendar instance (for example, if the 31st of June is specified).

The following operations are defined for this class:

See Also

[Android Documentation]

Requirements

Namespace: Javax.Xml.Datatype
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 8