XMLGregorianCalendar Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Representation for W3C XML Schema 1.
[Android.Runtime.Register("javax/xml/datatype/XMLGregorianCalendar", DoNotGenerateAcw=true)]
public abstract class XMLGregorianCalendar : Java.Lang.Object, IDisposable, Java.Interop.IJavaPeerable, Java.Lang.ICloneable
[<Android.Runtime.Register("javax/xml/datatype/XMLGregorianCalendar", DoNotGenerateAcw=true)>]
type XMLGregorianCalendar = class
inherit Object
interface ICloneable
interface IJavaObject
interface IDisposable
interface IJavaPeerable
- Inheritance
- Attributes
- Implements
Remarks
Representation for W3C XML Schema 1.0 date/time datatypes. Specifically, these date/time datatypes are <c>dateTime</c>, <c>time</c>, <c>date</c>, <c>gYearMonth</c>, <c>gMonthDay</c>, <c>gYear</c><c>gMonth</c> and <c>gDay</c> defined in the XML Namespace "http://www.w3.org/2001/XMLSchema"
. These datatypes are normatively defined in W3C XML Schema 1.0 Part 2, Section 3.2.7-14.
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 W3C XML Schema 1.0 Part 2, Appendix D, ISO 8601 Date and Time Formats.
"datetimefieldsmapping"/> <table border="2" rules="all" cellpadding="2"> <thead> <tr> <th align="center" colspan="3"> Date/Time Datatype Field Mapping Between XML Schema 1.0 and Java Representation </th> </tr> </thead> <tbody> <tr> <th>XML Schema 1.0<br/> datatype<br/> field</th> <th>Related<br/>XMLGregorianCalendar<br/>Accessor(s)</th> <th>Value Range</th> </tr> "datetimefield-year"/> <tr> <td> year </td> <td> <c>#getYear()</c> + <c>#getEon()</c> or<br/> <c>#getEonAndYear</c></td> <td> <c>getYear()</c> is a value between -(10^9-1) to (10^9)-1 or <c>DatatypeConstants#FIELD_UNDEFINED</c>.<br/> <c>#getEon()</c> is high order year value in billion of years.<br/> <c>getEon()</c> 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.</br> Given that <see href="http://www.w3.org/2001/05/xmlschema-errata#e2-63">XML Schema 1.0 errata</see> 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. </td> </tr> "datetimefield-month"/&gt; &lt;tr&gt; &lt;td&gt; month &lt;/td&gt; &lt;td&gt; &lt;c&gt;#getMonth()&lt;/c&gt;&lt;/td&gt; &lt;td&gt; 1 to 12 or &lt;c&gt;DatatypeConstants#FIELD_UNDEFINED&lt;/c&gt;&lt;/td&gt; &lt;/tr&gt; "datetimefield-day"/&amp;gt; &amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; day &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; &amp;lt;c&amp;gt;#getDay()&amp;lt;/c&amp;gt;&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Independent of month, max range is 1 to 31 or &amp;lt;c&amp;gt;DatatypeConstants#FIELD_UNDEFINED&amp;lt;/c&amp;gt;.&amp;lt;br/&amp;gt; The normative value constraint stated relative to month field's value is in &amp;lt;see href="http://www.w3.org/TR/xmlschema-2/#isoformats"&amp;gt;W3C XML Schema 1.0 Part 2, Appendix D&amp;lt;/see&amp;gt;. &amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt; &amp;lt;tr id="datetimefield-hour"&amp;gt; &amp;lt;td&amp;gt;hour&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;&amp;lt;c&amp;gt;#getHour()&amp;lt;/c&amp;gt;&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; 0 to 24 or &amp;lt;c&amp;gt;DatatypeConstants#FIELD_UNDEFINED&amp;lt;/c&amp;gt;. For a value of 24, the minute and second field must be zero per &amp;lt;see href="http://www.w3.org/2001/05/xmlschema-errata#e2-45"&amp;gt;XML Schema Errata&amp;lt;/see&amp;gt;. &amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt; "datetimefield-minute"/&amp;amp;gt; &amp;amp;lt;tr&amp;amp;gt; &amp;amp;lt;td&amp;amp;gt; minute &amp;amp;lt;/td&amp;amp;gt; &amp;amp;lt;td&amp;amp;gt; &amp;amp;lt;c&amp;amp;gt;#getMinute()&amp;amp;lt;/c&amp;amp;gt;&amp;amp;lt;/td&amp;amp;gt; &amp;amp;lt;td&amp;amp;gt; 0 to 59 or &amp;amp;lt;c&amp;amp;gt;DatatypeConstants#FIELD_UNDEFINED&amp;amp;lt;/c&amp;amp;gt;&amp;amp;lt;/td&amp;amp;gt; &amp;amp;lt;/tr&amp;amp;gt; "datetimefield-second"/&amp;amp;amp;gt; &amp;amp;amp;lt;tr&amp;amp;amp;gt; &amp;amp;amp;lt;td&amp;amp;amp;gt;second&amp;amp;amp;lt;/td&amp;amp;amp;gt; &amp;amp;amp;lt;td&amp;amp;amp;gt; &amp;amp;amp;lt;c&amp;amp;amp;gt;#getSecond()&amp;amp;amp;lt;/c&amp;amp;amp;gt; + &amp;amp;amp;lt;c&amp;amp;amp;gt;#getMillisecond()&amp;amp;amp;lt;/c&amp;amp;amp;gt;/1000 or&amp;amp;amp;lt;br/&amp;amp;amp;gt; &amp;amp;amp;lt;c&amp;amp;amp;gt;#getSecond()&amp;amp;amp;lt;/c&amp;amp;amp;gt; + &amp;amp;amp;lt;c&amp;amp;amp;gt;#getFractionalSecond()&amp;amp;amp;lt;/c&amp;amp;amp;gt;&amp;amp;amp;lt;/td&amp;amp;amp;gt; &amp;amp;amp;lt;td&amp;amp;amp;gt; &amp;amp;amp;lt;c&amp;amp;amp;gt;#getSecond()&amp;amp;amp;lt;/c&amp;amp;amp;gt; from 0 to 60 or &amp;amp;amp;lt;c&amp;amp;amp;gt;DatatypeConstants#FIELD_UNDEFINED&amp;amp;amp;lt;/c&amp;amp;amp;gt;.&amp;amp;amp;lt;br/&amp;amp;amp;gt; &amp;amp;amp;lt;i&amp;amp;amp;gt;(Note: 60 only allowable for leap second.)&amp;amp;amp;lt;/i&amp;amp;amp;gt;&amp;amp;amp;lt;br/&amp;amp;amp;gt; &amp;amp;amp;lt;c&amp;amp;amp;gt;#getFractionalSecond()&amp;amp;amp;lt;/c&amp;amp;amp;gt; allows for infinite precision over the range from 0.0 to 1.0 when the &amp;amp;amp;lt;c&amp;amp;amp;gt;#getSecond()&amp;amp;amp;lt;/c&amp;amp;amp;gt; is defined.&amp;amp;amp;lt;br/&amp;amp;amp;gt; &amp;amp;amp;lt;c&amp;amp;amp;gt;FractionalSecond&amp;amp;amp;lt;/c&amp;amp;amp;gt; is optional and has a value of &amp;amp;amp;lt;c&amp;amp;amp;gt;null&amp;amp;amp;lt;/c&amp;amp;amp;gt; when it is undefined.&amp;amp;amp;lt;br /&amp;amp;amp;gt; &amp;amp;amp;lt;c&amp;amp;amp;gt;#getMillisecond()&amp;amp;amp;lt;/c&amp;amp;amp;gt; is the convenience millisecond precision of value of &amp;amp;amp;lt;c&amp;amp;amp;gt;#getFractionalSecond()&amp;amp;amp;lt;/c&amp;amp;amp;gt;. &amp;amp;amp;lt;/td&amp;amp;amp;gt; &amp;amp;amp;lt;/tr&amp;amp;amp;gt; &amp;amp;amp;lt;tr id="datetimefield-timezone"&amp;amp;amp;gt; &amp;amp;amp;lt;td&amp;amp;amp;gt; timezone &amp;amp;amp;lt;/td&amp;amp;amp;gt; &amp;amp;amp;lt;td&amp;amp;amp;gt; &amp;amp;amp;lt;c&amp;amp;amp;gt;#getTimezone()&amp;amp;amp;lt;/c&amp;amp;amp;gt;&amp;amp;amp;lt;/td&amp;amp;amp;gt; &amp;amp;amp;lt;td&amp;amp;amp;gt; Number of minutes or &amp;amp;amp;lt;c&amp;amp;amp;gt;DatatypeConstants#FIELD_UNDEFINED&amp;amp;amp;lt;/c&amp;amp;amp;gt;. Value range from -14 hours (-14 * 60 minutes) to 14 hours (14 * 60 minutes). &amp;amp;amp;lt;/td&amp;amp;amp;gt; &amp;amp;amp;lt;/tr&amp;amp;amp;gt; &amp;amp;amp;lt;/tbody&amp;amp;amp;gt; &amp;amp;amp;lt;/table&amp;amp;amp;gt;
All maximum value space constraints listed for the fields in the table above are checked by factory methods,
Added in 1.5.
Java documentation for javax.xml.datatype.XMLGregorianCalendar
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Constructors
XMLGregorianCalendar() | |
XMLGregorianCalendar(IntPtr, JniHandleOwnership) |
A constructor used when creating managed representations of JNI objects; called by the runtime. |
Properties
Class |
Returns the runtime class of this |
Day | |
Eon | |
EonAndYear | |
FractionalSecond | |
Handle |
The handle to the underlying Android instance. (Inherited from Object) |
Hour |
Return hours or FieldUndefined. |
IsValid |
Validate instance by |
JniIdentityHashCode | (Inherited from Object) |
JniPeerMembers | |
Millisecond |
Return millisecond precision of |
Minute |
Returns FieldUndefined if this field is not defined. |
Month | |
PeerReference | (Inherited from Object) |
Second | |
ThresholdClass |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. |
ThresholdType |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. |
Timezone |
Return timezone offset in minutes or FieldUndefined if this optional field is not defined. |
XMLSchemaType | |
Year |
Methods
Add(Duration) |
Add |
Clear() |
Unset all fields to undefined. |
Clone() |
Creates and returns a copy of this object. |
Compare(XMLGregorianCalendar) |
Compare two instances of W3C XML Schema 1. |
Dispose() | (Inherited from Object) |
Dispose(Boolean) | (Inherited from Object) |
Equals(Object) |
Indicates whether some other object is "equal to" this one. (Inherited from Object) |
GetHashCode() |
Returns a hash code value for the object. (Inherited from Object) |
GetTimeZone(Int32) |
Returns a |
JavaFinalize() |
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. (Inherited from Object) |
Normalize() |
Normalize this instance to UTC. |
Notify() |
Wakes up a single thread that is waiting on this object's monitor. (Inherited from Object) |
NotifyAll() |
Wakes up all threads that are waiting on this object's monitor. (Inherited from Object) |
Reset() |
Reset this |
SetHandle(IntPtr, JniHandleOwnership) |
Sets the Handle property. (Inherited from Object) |
SetMillisecond(Int32) |
Set milliseconds. |
SetTime(Int32, Int32, Int32) |
Set time as one unit. |
SetTime(Int32, Int32, Int32, BigDecimal) |
Set time as one unit, including the optional infinite precision fractional seconds. |
SetTime(Int32, Int32, Int32, Int32) |
Set time as one unit, including optional milliseconds. |
SetYear(BigInteger) |
Set low and high order component of XSD |
ToArray<T>() | (Inherited from Object) |
ToGregorianCalendar() |
Convert this |
ToGregorianCalendar(TimeZone, Locale, XMLGregorianCalendar) |
Convert this |
ToString() |
Returns a string representation of the object. (Inherited from Object) |
ToXMLFormat() |
Return the lexical representation of |
UnregisterFromRuntime() | (Inherited from Object) |
Wait() |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>. (Inherited from Object) |
Wait(Int64) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Wait(Int64, Int32) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Explicit Interface Implementations
IJavaPeerable.Disposed() | (Inherited from Object) |
IJavaPeerable.DisposeUnlessReferenced() | (Inherited from Object) |
IJavaPeerable.Finalized() | (Inherited from Object) |
IJavaPeerable.JniManagedPeerState | (Inherited from Object) |
IJavaPeerable.SetJniIdentityHashCode(Int32) | (Inherited from Object) |
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) | (Inherited from Object) |
IJavaPeerable.SetPeerReference(JniObjectReference) | (Inherited from Object) |
Extension Methods
JavaCast<TResult>(IJavaObject) |
Performs an Android runtime-checked type conversion. |
JavaCast<TResult>(IJavaObject) | |
GetJniTypeName(IJavaPeerable) |