| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd"> |
| <!--NewPage--> |
| <HTML> |
| <HEAD> |
| <!-- Generated by javadoc on Thu Sep 25 16:47:00 PDT 2003 --> |
| <TITLE> |
| XmlCalendar (XMLBeans Documentation) |
| </TITLE> |
| <META NAME="keywords" CONTENT="org.apache.xmlbeans.XmlCalendar,XmlCalendar class"> |
| <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> |
| </HEAD> |
| <SCRIPT> |
| function asd() |
| { |
| parent.document.title="XmlCalendar (XMLBeans Documentation)"; |
| } |
| </SCRIPT> |
| <BODY BGCOLOR="white" onload="asd();"> |
| |
| <!-- ========== START OF NAVBAR ========== --> |
| <A NAME="navbar_top"><!-- --></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> |
| <TR> |
| <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_top_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../org/apache/xmlbeans/XmlByte.Factory.html"><B>PREV CLASS</B></A> |
| <A HREF="../../../org/apache/xmlbeans/XmlCursor.TokenType.html"><B>NEXT CLASS</B></A></FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> |
| <A HREF="XmlCalendar.html" TARGET="_top"><B>NO FRAMES</B></A> |
| |
| <SCRIPT> |
| <!-- |
| if(window==top) { |
| document.writeln('<A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>'); |
| } |
| //--> |
| </SCRIPT> |
| <NOSCRIPT> |
| <A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A> |
| </NOSCRIPT> |
| </FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: NESTED | <A HREF="#fields_inherited_from_class_java.util.GregorianCalendar">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <!-- =========== END OF NAVBAR =========== --> |
| |
| <HR> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <H2> |
| <FONT SIZE="-1"> |
| org.apache.xmlbeans</FONT> |
| <BR> |
| Class XmlCalendar</H2> |
| <PRE> |
| <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html">java.lang.Object</A> |
| | |
| +--<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html">java.util.Calendar</A> |
| | |
| +--<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/GregorianCalendar.html">java.util.GregorianCalendar</A> |
| | |
| +--<B>org.apache.xmlbeans.XmlCalendar</B> |
| </PRE> |
| <DL> |
| <DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Cloneable.html">Cloneable</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Serializable.html">Serializable</A></DD> |
| </DL> |
| <HR> |
| <DL> |
| <DT>public class <B>XmlCalendar</B><DT>extends <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/GregorianCalendar.html">GregorianCalendar</A></DL> |
| |
| <P> |
| An XML Schema compatible subclass of <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/GregorianCalendar.html"><CODE>GregorianCalendar</CODE></A>. |
| XmlCalendar modifies several key details in the behavior of |
| GregorianCalendar to make it more useful when dealing with XML dates. |
| <p> |
| It is easy to convert between XmlCalendar and <A HREF="../../../org/apache/xmlbeans/GDate.html"><CODE>GDate</CODE></A>, or to |
| parse or emit an XmlCalendar using a standard XML Schema |
| lexical representation. |
| <ol> |
| <li> |
| To match XML Schema dates, this XmlCalendar is a fully proleptic |
| Gregorian calendar by default, which means that Gregorian calendar |
| rules are applied backwards in time as if they had always been in |
| effect, actual historical circumstances concerning the observance |
| of the 1582 decree of Pope Gregory XIII notwithstanding. |
| </li> |
| <li> |
| In order to better support partially-specified dates for XML Schema, |
| this implementation provides a stable get(field) method |
| that does not modify the instance if you are acessing a field right |
| after it was explicitly set: a set followed by a get will always |
| return the same thing and will not fill in any other fields. However, |
| if you get a field that was not explicitly set, then all the fields |
| are still automatically filled and normalized for you, just like a |
| regular GregorianCalendar. If you wish to force the completion and |
| defaulting of all the fields (without hunting to get one that happens |
| to be unset), you can always do so by calling getTime(). |
| </li> |
| <li> |
| When a year is unspecified and needs to be filled in automatically |
| (for example when using a .get or .getTime method as discussed above), |
| the year is defaulted to year 0 (also known as 1 BC). This is different |
| from <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/GregorianCalendar.html"><CODE>GregorianCalendar</CODE></A>, which chooses 1970. The reason 0 is preferable |
| is that it is a leap year and so it permits the date --2-29 to be specified |
| stably. A different default year can be chosen via the static method |
| <A HREF="../../../org/apache/xmlbeans/XmlCalendar.html#setDefaultYear(int)"><CODE>XmlCalendar.setDefaultYear()</CODE></A>, or by setting the |
| system property "user.defaultyear". If you do change this value, you should |
| pick another leap year such as 2000 and avoid non-leap years such as 1900. |
| </li> |
| <li> |
| When constructing an XmlCalendar from an XML Schema |
| formatted date or time string or GDate object, the timezone |
| for the calendar is taken from the string if it is present, or |
| taken to be <CODE>TimeZone.getDefault()</CODE> if not. |
| <p> |
| For example, the XML timezone "Z" is translated to "GMT"; |
| the XML timezone "+05:00" is translated to "GMT+05:00". |
| </p> |
| </li> |
| <li> |
| Finally, this implementation provides a String constructor and a |
| toString() method that comply with the XML Schema conventions |
| for formatting a date. If only a subset of fields have been |
| explicitly set, toString() produces a string with the proper subset |
| of information. |
| </li> |
| </ol> |
| <P> |
| |
| <P> |
| <DL> |
| <DT><B>See Also:</B><DD><A HREF="../../../serialized-form.html" TARGET="org.apache.xmlbeans.XmlCalendar">Serialized Form</A></DL> |
| <HR> |
| |
| <P> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| |
| |
| <!-- =========== FIELD SUMMARY =========== --> |
| |
| <A NAME="field_summary"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TD COLSPAN=2><FONT SIZE="+2"> |
| <B>Field Summary</B></FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="fields_inherited_from_class_java.util.GregorianCalendar"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
| <TD><B>Fields inherited from class java.util.<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/GregorianCalendar.html">GregorianCalendar</A></B></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/GregorianCalendar.html#AD">AD</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/GregorianCalendar.html#BC">BC</A></CODE></TD> |
| </TR> |
| </TABLE> |
| <A NAME="fields_inherited_from_class_java.util.Calendar"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
| <TD><B>Fields inherited from class java.util.<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html">Calendar</A></B></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#AM">AM</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#AM_PM">AM_PM</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#APRIL">APRIL</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#areFieldsSet">areFieldsSet</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#AUGUST">AUGUST</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#DATE">DATE</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#DAY_OF_MONTH">DAY_OF_MONTH</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#DAY_OF_WEEK">DAY_OF_WEEK</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#DAY_OF_WEEK_IN_MONTH">DAY_OF_WEEK_IN_MONTH</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#DAY_OF_YEAR">DAY_OF_YEAR</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#DECEMBER">DECEMBER</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#DST_OFFSET">DST_OFFSET</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#ERA">ERA</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#FEBRUARY">FEBRUARY</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#FIELD_COUNT">FIELD_COUNT</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#fields">fields</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#FRIDAY">FRIDAY</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#HOUR">HOUR</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#HOUR_OF_DAY">HOUR_OF_DAY</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#isSet">isSet</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#isTimeSet">isTimeSet</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#JANUARY">JANUARY</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#JULY">JULY</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#JUNE">JUNE</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#MARCH">MARCH</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#MAY">MAY</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#MILLISECOND">MILLISECOND</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#MINUTE">MINUTE</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#MONDAY">MONDAY</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#MONTH">MONTH</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#NOVEMBER">NOVEMBER</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#OCTOBER">OCTOBER</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#PM">PM</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#SATURDAY">SATURDAY</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#SECOND">SECOND</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#SEPTEMBER">SEPTEMBER</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#SUNDAY">SUNDAY</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#THURSDAY">THURSDAY</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#time">time</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#TUESDAY">TUESDAY</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#UNDECIMBER">UNDECIMBER</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#WEDNESDAY">WEDNESDAY</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#WEEK_OF_MONTH">WEEK_OF_MONTH</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#WEEK_OF_YEAR">WEEK_OF_YEAR</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#YEAR">YEAR</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#ZONE_OFFSET">ZONE_OFFSET</A></CODE></TD> |
| </TR> |
| </TABLE> |
| |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| |
| <A NAME="constructor_summary"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TD COLSPAN=2><FONT SIZE="+2"> |
| <B>Constructor Summary</B></FONT></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><B><A HREF="../../../org/apache/xmlbeans/XmlCalendar.html#XmlCalendar()">XmlCalendar</A></B>()</CODE> |
| |
| <BR> |
| Constructs an empty instance with no fields set.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><B><A HREF="../../../org/apache/xmlbeans/XmlCalendar.html#XmlCalendar(java.util.Date)">XmlCalendar</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Date.html">Date</A> date)</CODE> |
| |
| <BR> |
| Constructs an XmlCalendar from a Date.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><B><A HREF="../../../org/apache/xmlbeans/XmlCalendar.html#XmlCalendar(org.apache.xmlbeans.GDateSpecification)">XmlCalendar</A></B>(<A HREF="../../../org/apache/xmlbeans/GDateSpecification.html">GDateSpecification</A> date)</CODE> |
| |
| <BR> |
| Constructs an XmlCalendar from a GDate.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><B><A HREF="../../../org/apache/xmlbeans/XmlCalendar.html#XmlCalendar(int, int, int, int, int, int, java.math.BigDecimal)">XmlCalendar</A></B>(int year, |
| int month, |
| int day, |
| int hour, |
| int minute, |
| int second, |
| <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigDecimal.html">BigDecimal</A> fraction)</CODE> |
| |
| <BR> |
| Constructs an XmlCalendar with the specified year, month, day, |
| hours, minutes, seconds, and optional fractional seconds, in |
| the default timezone.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><B><A HREF="../../../org/apache/xmlbeans/XmlCalendar.html#XmlCalendar(int, int, int, int, int, int, java.math.BigDecimal, int, int, int)">XmlCalendar</A></B>(int year, |
| int month, |
| int day, |
| int hour, |
| int minute, |
| int second, |
| <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigDecimal.html">BigDecimal</A> fraction, |
| int tzSign, |
| int tzHour, |
| int tzMinute)</CODE> |
| |
| <BR> |
| Constructs an XmlCalendar with the specified year, month, day, |
| hours, minutes, seconds, and optional fractional seconds, in |
| the specified timezone.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><B><A HREF="../../../org/apache/xmlbeans/XmlCalendar.html#XmlCalendar(java.lang.String)">XmlCalendar</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html">String</A> xmlSchemaDateString)</CODE> |
| |
| <BR> |
| Constructs an XmlCalendar for a standard XML |
| schema formatted date string.</TD> |
| </TR> |
| </TABLE> |
| |
| <!-- ========== METHOD SUMMARY =========== --> |
| |
| <A NAME="method_summary"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TD COLSPAN=2><FONT SIZE="+2"> |
| <B>Method Summary</B></FONT></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>protected void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../org/apache/xmlbeans/XmlCalendar.html#computeTime()">computeTime</A></B>()</CODE> |
| |
| <BR> |
| Overrides GregorianCalendar.computeTime to apply a different |
| default year.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> int</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../org/apache/xmlbeans/XmlCalendar.html#get(int)">get</A></B>(int field)</CODE> |
| |
| <BR> |
| Gets the value for a given time field.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static int</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../org/apache/xmlbeans/XmlCalendar.html#getDefaultYear()">getDefaultYear</A></B>()</CODE> |
| |
| <BR> |
| Returns the default year that is used when no year is specified.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../org/apache/xmlbeans/XmlCalendar.html#setDefaultYear(int)">setDefaultYear</A></B>(int year)</CODE> |
| |
| <BR> |
| Sets the default year to be used when no year is specified.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html">String</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../org/apache/xmlbeans/XmlCalendar.html#toString()">toString</A></B>()</CODE> |
| |
| <BR> |
| Prints the XmlCalendar using a standard XML Schema |
| format, as described in XmlCalendar(String s).</TD> |
| </TR> |
| </TABLE> |
| <A NAME="methods_inherited_from_class_java.util.GregorianCalendar"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
| <TD><B>Methods inherited from class java.util.<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/GregorianCalendar.html">GregorianCalendar</A></B></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/GregorianCalendar.html#add(int, int)">add</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/GregorianCalendar.html#computeFields()">computeFields</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/GregorianCalendar.html#equals(java.lang.Object)">equals</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/GregorianCalendar.html#getActualMaximum(int)">getActualMaximum</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/GregorianCalendar.html#getActualMinimum(int)">getActualMinimum</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/GregorianCalendar.html#getGreatestMinimum(int)">getGreatestMinimum</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/GregorianCalendar.html#getGregorianChange()">getGregorianChange</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/GregorianCalendar.html#getLeastMaximum(int)">getLeastMaximum</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/GregorianCalendar.html#getMaximum(int)">getMaximum</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/GregorianCalendar.html#getMinimum(int)">getMinimum</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/GregorianCalendar.html#hashCode()">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/GregorianCalendar.html#isLeapYear(int)">isLeapYear</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/GregorianCalendar.html#roll(int, boolean)">roll</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/GregorianCalendar.html#roll(int, int)">roll</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/GregorianCalendar.html#setGregorianChange(java.util.Date)">setGregorianChange</A></CODE></TD> |
| </TR> |
| </TABLE> |
| <A NAME="methods_inherited_from_class_java.util.Calendar"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
| <TD><B>Methods inherited from class java.util.<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html">Calendar</A></B></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#after(java.lang.Object)">after</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#before(java.lang.Object)">before</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#clear()">clear</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#clear(int)">clear</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#clone()">clone</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#complete()">complete</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#getAvailableLocales()">getAvailableLocales</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#getFirstDayOfWeek()">getFirstDayOfWeek</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#getInstance()">getInstance</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#getInstance(java.util.Locale)">getInstance</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#getInstance(java.util.TimeZone)">getInstance</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#getInstance(java.util.TimeZone, java.util.Locale)">getInstance</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#getMinimalDaysInFirstWeek()">getMinimalDaysInFirstWeek</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#getTime()">getTime</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#getTimeInMillis()">getTimeInMillis</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#getTimeZone()">getTimeZone</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#internalGet(int)">internalGet</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#isLenient()">isLenient</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#isSet(int)">isSet</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#set(int, int)">set</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#set(int, int, int)">set</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#set(int, int, int, int, int)">set</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#set(int, int, int, int, int, int)">set</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#setFirstDayOfWeek(int)">setFirstDayOfWeek</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#setLenient(boolean)">setLenient</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#setMinimalDaysInFirstWeek(int)">setMinimalDaysInFirstWeek</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#setTime(java.util.Date)">setTime</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#setTimeInMillis(long)">setTimeInMillis</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#setTimeZone(java.util.TimeZone)">setTimeZone</A></CODE></TD> |
| </TR> |
| </TABLE> |
| <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
| <TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html">Object</A></B></TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#finalize()">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#getClass()">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#notify()">notify</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#wait()">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#wait(long)">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#wait(long, int)">wait</A></CODE></TD> |
| </TR> |
| </TABLE> |
| |
| <P> |
| |
| <!-- ============ FIELD DETAIL =========== --> |
| |
| |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| |
| <A NAME="constructor_detail"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TD COLSPAN=1><FONT SIZE="+2"> |
| <B>Constructor Detail</B></FONT></TD> |
| </TR> |
| </TABLE> |
| |
| <A NAME="XmlCalendar(java.lang.String)"><!-- --></A><H3> |
| XmlCalendar</H3> |
| <PRE> |
| public <B>XmlCalendar</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html">String</A> xmlSchemaDateString)</PRE> |
| <DL> |
| <DD>Constructs an XmlCalendar for a standard XML |
| schema formatted date string. |
| |
| The parser accepts any of the following formats: |
| |
| YYYY-MM-DDThh:mm:ss - dateTime |
| YYYY-MM-DD - date |
| hh:mm:ss - time |
| YYYY - gYear |
| --MM - gMonth |
| ---DD - gDay |
| |
| The parser actually accepts all 16 combinations of subsets of |
| fields (Y, M, D, T) using the same scheme, even for combinations |
| that are not defined as types in the schema spec, such as |
| year, day, and time: |
| |
| YYYY--DDThh:mm:ss - [everything but month specified] |
| |
| In the string, each field must be padded to its full width, for |
| example, January must be --01, not just --1. |
| |
| In particular, a year must be padded to at least four digits, so |
| "98" is not a valid year, although "1998" and "0098" are both valid |
| years, unambiguously 19 centuries separated from each other. A year |
| may also be preceded by a minus symbol: 0000 is 1 BC and -0001 is |
| 2 BC. |
| |
| Finally a timezone is always allowed (yet optional) at the end. |
| Timezones must be either "Z" (UTC, which we translate to GMT), |
| or simple offsets from UTC in the range "-14:00" to "+14:00", |
| for example: "14:30:00-05:00" specifies 2:30 PM in the |
| afternoon at UTC-05:00, which is the same as EST. |
| |
| If a timezone is not specified, the default TimeZone is used. |
| <P> |
| </DL> |
| <HR> |
| |
| <A NAME="XmlCalendar(org.apache.xmlbeans.GDateSpecification)"><!-- --></A><H3> |
| XmlCalendar</H3> |
| <PRE> |
| public <B>XmlCalendar</B>(<A HREF="../../../org/apache/xmlbeans/GDateSpecification.html">GDateSpecification</A> date)</PRE> |
| <DL> |
| <DD>Constructs an XmlCalendar from a GDate. |
| |
| If the instance is not completed, you can round-trip to an |
| equivalent GDate by writing "new GDate(new XmlCalendar(gdate))". |
| However, if you access any of the unset fields of the calendar, all |
| the fields will be automatically filled in, so partial dates |
| without timezones or other fields will not round-trip after access. |
| <P> |
| </DL> |
| <HR> |
| |
| <A NAME="XmlCalendar(java.util.Date)"><!-- --></A><H3> |
| XmlCalendar</H3> |
| <PRE> |
| public <B>XmlCalendar</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Date.html">Date</A> date)</PRE> |
| <DL> |
| <DD>Constructs an XmlCalendar from a Date. |
| |
| The default TimeZone is used for computing the various fields. |
| <P> |
| </DL> |
| <HR> |
| |
| <A NAME="XmlCalendar(int, int, int, int, int, int, java.math.BigDecimal)"><!-- --></A><H3> |
| XmlCalendar</H3> |
| <PRE> |
| public <B>XmlCalendar</B>(int year, |
| int month, |
| int day, |
| int hour, |
| int minute, |
| int second, |
| <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigDecimal.html">BigDecimal</A> fraction)</PRE> |
| <DL> |
| <DD>Constructs an XmlCalendar with the specified year, month, day, |
| hours, minutes, seconds, and optional fractional seconds, in |
| the default timezone. |
| <P> |
| </DL> |
| <HR> |
| |
| <A NAME="XmlCalendar(int, int, int, int, int, int, java.math.BigDecimal, int, int, int)"><!-- --></A><H3> |
| XmlCalendar</H3> |
| <PRE> |
| public <B>XmlCalendar</B>(int year, |
| int month, |
| int day, |
| int hour, |
| int minute, |
| int second, |
| <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigDecimal.html">BigDecimal</A> fraction, |
| int tzSign, |
| int tzHour, |
| int tzMinute)</PRE> |
| <DL> |
| <DD>Constructs an XmlCalendar with the specified year, month, day, |
| hours, minutes, seconds, and optional fractional seconds, in |
| the specified timezone. |
| <P> |
| </DL> |
| <HR> |
| |
| <A NAME="XmlCalendar()"><!-- --></A><H3> |
| XmlCalendar</H3> |
| <PRE> |
| public <B>XmlCalendar</B>()</PRE> |
| <DL> |
| <DD>Constructs an empty instance with no fields set. |
| <P> |
| </DL> |
| |
| <!-- ============ METHOD DETAIL ========== --> |
| |
| <A NAME="method_detail"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TD COLSPAN=1><FONT SIZE="+2"> |
| <B>Method Detail</B></FONT></TD> |
| </TR> |
| </TABLE> |
| |
| <A NAME="get(int)"><!-- --></A><H3> |
| get</H3> |
| <PRE> |
| public int <B>get</B>(int field)</PRE> |
| <DL> |
| <DD>Gets the value for a given time field. |
| |
| Unlike the GregorianCalendar implementation, the get() does not |
| force a complete of all fields. If you wish to force a completion |
| of all the fields, call getTime() first. |
| <P> |
| <DD><DL> |
| <DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#get(int)">get</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html">Calendar</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getDefaultYear()"><!-- --></A><H3> |
| getDefaultYear</H3> |
| <PRE> |
| public static int <B>getDefaultYear</B>()</PRE> |
| <DL> |
| <DD>Returns the default year that is used when no year is specified. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="setDefaultYear(int)"><!-- --></A><H3> |
| setDefaultYear</H3> |
| <PRE> |
| public static void <B>setDefaultYear</B>(int year)</PRE> |
| <DL> |
| <DD>Sets the default year to be used when no year is specified. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="computeTime()"><!-- --></A><H3> |
| computeTime</H3> |
| <PRE> |
| protected void <B>computeTime</B>()</PRE> |
| <DL> |
| <DD>Overrides GregorianCalendar.computeTime to apply a different |
| default year. (It must be a leap year.) |
| <P> |
| <DD><DL> |
| <DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/GregorianCalendar.html#computeTime()">computeTime</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/GregorianCalendar.html">GregorianCalendar</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="toString()"><!-- --></A><H3> |
| toString</H3> |
| <PRE> |
| public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html">String</A> <B>toString</B>()</PRE> |
| <DL> |
| <DD>Prints the XmlCalendar using a standard XML Schema |
| format, as described in XmlCalendar(String s). |
| <P> |
| <DD><DL> |
| <DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html#toString()">toString</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Calendar.html">Calendar</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <HR> |
| |
| <!-- ========== START OF NAVBAR ========== --> |
| <A NAME="navbar_bottom"><!-- --></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> |
| <TR> |
| <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_bottom_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../org/apache/xmlbeans/XmlByte.Factory.html"><B>PREV CLASS</B></A> |
| <A HREF="../../../org/apache/xmlbeans/XmlCursor.TokenType.html"><B>NEXT CLASS</B></A></FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> |
| <A HREF="XmlCalendar.html" TARGET="_top"><B>NO FRAMES</B></A> |
| |
| <SCRIPT> |
| <!-- |
| if(window==top) { |
| document.writeln('<A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>'); |
| } |
| //--> |
| </SCRIPT> |
| <NOSCRIPT> |
| <A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A> |
| </NOSCRIPT> |
| </FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: NESTED | <A HREF="#fields_inherited_from_class_java.util.GregorianCalendar">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <!-- =========== END OF NAVBAR =========== --> |
| |
| <HR> |
| |
| </BODY> |
| </HTML> |