📄 calendar.html
字号:
<BR> Sets the time zone with the given time zone value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/Calendar.html#toString()">toString</A></B>()</CODE><BR> Return a string representation of this calendar.</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="../../java/lang/Object.html">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/lang/Object.html#finalize()">finalize</A>, <A HREF="../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="ERA"><!-- --></A><H3>ERA</H3><PRE>public static final int <B>ERA</B></PRE><DL><DD>Field number for <code>get</code> and <code>set</code> indicating the era, e.g., AD or BC in the Julian calendar. This is a calendar-specific value; see subclass documentation.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/util/GregorianCalendar.html#AD"><CODE>GregorianCalendar.AD</CODE></A>, <A HREF="../../java/util/GregorianCalendar.html#BC"><CODE>GregorianCalendar.BC</CODE></A></DL></DD></DL><HR><A NAME="YEAR"><!-- --></A><H3>YEAR</H3><PRE>public static final int <B>YEAR</B></PRE><DL><DD>Field number for <code>get</code> and <code>set</code> indicating the year. This is a calendar-specific value; see subclass documentation.</DL><HR><A NAME="MONTH"><!-- --></A><H3>MONTH</H3><PRE>public static final int <B>MONTH</B></PRE><DL><DD>Field number for <code>get</code> and <code>set</code> indicating the month. This is a calendar-specific value. The first month of the year is <code>JANUARY</code>; the last depends on the number of months in a year.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/util/Calendar.html#JANUARY"><CODE>JANUARY</CODE></A>, <A HREF="../../java/util/Calendar.html#FEBRUARY"><CODE>FEBRUARY</CODE></A>, <A HREF="../../java/util/Calendar.html#MARCH"><CODE>MARCH</CODE></A>, <A HREF="../../java/util/Calendar.html#APRIL"><CODE>APRIL</CODE></A>, <A HREF="../../java/util/Calendar.html#MAY"><CODE>MAY</CODE></A>, <A HREF="../../java/util/Calendar.html#JUNE"><CODE>JUNE</CODE></A>, <A HREF="../../java/util/Calendar.html#JULY"><CODE>JULY</CODE></A>, <A HREF="../../java/util/Calendar.html#AUGUST"><CODE>AUGUST</CODE></A>, <A HREF="../../java/util/Calendar.html#SEPTEMBER"><CODE>SEPTEMBER</CODE></A>, <A HREF="../../java/util/Calendar.html#OCTOBER"><CODE>OCTOBER</CODE></A>, <A HREF="../../java/util/Calendar.html#NOVEMBER"><CODE>NOVEMBER</CODE></A>, <A HREF="../../java/util/Calendar.html#DECEMBER"><CODE>DECEMBER</CODE></A>, <A HREF="../../java/util/Calendar.html#UNDECIMBER"><CODE>UNDECIMBER</CODE></A></DL></DD></DL><HR><A NAME="WEEK_OF_YEAR"><!-- --></A><H3>WEEK_OF_YEAR</H3><PRE>public static final int <B>WEEK_OF_YEAR</B></PRE><DL><DD>Field number for <code>get</code> and <code>set</code> indicating the week number within the current year. The first week of the year, as defined by <code>getFirstDayOfWeek()</code> and <code>getMinimalDaysInFirstWeek()</code>, has value 1. Subclasses define the value of <code>WEEK_OF_YEAR</code> for days before the first week of the year.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/util/Calendar.html#getFirstDayOfWeek()"><CODE>getFirstDayOfWeek()</CODE></A>, <A HREF="../../java/util/Calendar.html#getMinimalDaysInFirstWeek()"><CODE>getMinimalDaysInFirstWeek()</CODE></A></DL></DD></DL><HR><A NAME="WEEK_OF_MONTH"><!-- --></A><H3>WEEK_OF_MONTH</H3><PRE>public static final int <B>WEEK_OF_MONTH</B></PRE><DL><DD>Field number for <code>get</code> and <code>set</code> indicating the week number within the current month. The first week of the month, as defined by <code>getFirstDayOfWeek()</code> and <code>getMinimalDaysInFirstWeek()</code>, has value 1. Subclasses define the value of <code>WEEK_OF_MONTH</code> for days before the first week of the month.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/util/Calendar.html#getFirstDayOfWeek()"><CODE>getFirstDayOfWeek()</CODE></A>, <A HREF="../../java/util/Calendar.html#getMinimalDaysInFirstWeek()"><CODE>getMinimalDaysInFirstWeek()</CODE></A></DL></DD></DL><HR><A NAME="DATE"><!-- --></A><H3>DATE</H3><PRE>public static final int <B>DATE</B></PRE><DL><DD>Field number for <code>get</code> and <code>set</code> indicating the day of the month. This is a synonym for <code>DAY_OF_MONTH</code>. The first day of the month has value 1.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/util/Calendar.html#DAY_OF_MONTH"><CODE>DAY_OF_MONTH</CODE></A></DL></DD></DL><HR><A NAME="DAY_OF_MONTH"><!-- --></A><H3>DAY_OF_MONTH</H3><PRE>public static final int <B>DAY_OF_MONTH</B></PRE><DL><DD>Field number for <code>get</code> and <code>set</code> indicating the day of the month. This is a synonym for <code>DATE</code>. The first day of the month has value 1.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/util/Calendar.html#DATE"><CODE>DATE</CODE></A></DL></DD></DL><HR><A NAME="DAY_OF_YEAR"><!-- --></A><H3>DAY_OF_YEAR</H3><PRE>public static final int <B>DAY_OF_YEAR</B></PRE><DL><DD>Field number for <code>get</code> and <code>set</code> indicating the day number within the current year. The first day of the year has value 1.</DL><HR><A NAME="DAY_OF_WEEK"><!-- --></A><H3>DAY_OF_WEEK</H3><PRE>public static final int <B>DAY_OF_WEEK</B></PRE><DL><DD>Field number for <code>get</code> and <code>set</code> indicating the day of the week. This field takes values <code>SUNDAY</code>, <code>MONDAY</code>, <code>TUESDAY</code>, <code>WEDNESDAY</code>, <code>THURSDAY</code>, <code>FRIDAY</code>, and <code>SATURDAY</code>.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/util/Calendar.html#SUNDAY"><CODE>SUNDAY</CODE></A>, <A HREF="../../java/util/Calendar.html#MONDAY"><CODE>MONDAY</CODE></A>, <A HREF="../../java/util/Calendar.html#TUESDAY"><CODE>TUESDAY</CODE></A>, <A HREF="../../java/util/Calendar.html#WEDNESDAY"><CODE>WEDNESDAY</CODE></A>, <A HREF="../../java/util/Calendar.html#THURSDAY"><CODE>THURSDAY</CODE></A>, <A HREF="../../java/util/Calendar.html#FRIDAY"><CODE>FRIDAY</CODE></A>, <A HREF="../../java/util/Calendar.html#SATURDAY"><CODE>SATURDAY</CODE></A></DL></DD></DL><HR><A NAME="DAY_OF_WEEK_IN_MONTH"><!-- --></A><H3>DAY_OF_WEEK_IN_MONTH</H3><PRE>public static final int <B>DAY_OF_WEEK_IN_MONTH</B></PRE><DL><DD>Field number for <code>get</code> and <code>set</code> indicating the ordinal number of the day of the week within the current month. Together with the <code>DAY_OF_WEEK</code> field, this uniquely specifies a day within a month. Unlike <code>WEEK_OF_MONTH</code> and <code>WEEK_OF_YEAR</code>, this field's value does <em>not</em> depend on <code>getFirstDayOfWeek()</code> or <code>getMinimalDaysInFirstWeek()</code>. <code>DAY_OF_MONTH 1</code> through <code>7</code> always correspond to <code>DAY_OF_WEEK_IN_MONTH 1</code>; <code>8</code> through <code>15</code> correspond to <code>DAY_OF_WEEK_IN_MONTH 2</code>, and so on. <code>DAY_OF_WEEK_IN_MONTH 0</code> indicates the week before <code>DAY_OF_WEEK_IN_MONTH 1</code>. Negative values count back from the end of the month, so the last Sunday of a month is specified as <code>DAY_OF_WEEK = SUNDAY, DAY_OF_WEEK_IN_MONTH = -1</code>. Because negative values count backward they will usually be aligned differently within the month than positive values. For example, if a month has 31 days, <code>DAY_OF_WEEK_IN_MONTH -1</code> will overlap <code>DAY_OF_WEEK_IN_MONTH 5</code> and the end of <code>4</code>.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/util/Calendar.html#DAY_OF_WEEK"><CODE>DAY_OF_WEEK</CODE></A>, <A HREF="../../java/util/Calendar.html#WEEK_OF_MONTH"><CODE>WEEK_OF_MONTH</CODE></A></DL></DD></DL><HR><A NAME="AM_PM"><!-- --></A><H3>AM_PM</H3><PRE>public static final int <B>AM_PM</B></PRE><DL><DD>Field number for <code>get</code> and <code>set</code> indicating whether the <code>HOUR</code> is before or after noon. E.g., at 10:04:15.250 PM the <code>AM_PM</code> is <code>PM</code>.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/util/Calendar.html#AM"><CODE>AM</CODE></A>, <A HREF="../../java/util/Calendar.html#PM"><CODE>PM</CODE></A>, <A HREF="../../java/util/Calendar.html#HOUR"><CODE>HOUR</CODE></A></DL></DD></DL><HR><A NAME="HOUR"><!-- --></A><H3>HOUR</H3><PRE>public static final int <B>HOUR</B></PRE><DL><DD>Field number for <code>get</code> and <code>set</code> indicating the hour of the morning or afternoon. <code>HOUR</code> is used for the 12-hour clock. E.g., at 10:04:15.250 PM the <code>HOUR</code> is 10.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/util/Calendar.html#AM_PM"><CODE>AM_PM</CODE></A>, <A HREF="../../java/util/Calendar.html#HOUR_OF_DAY"><CODE>HOUR_OF_DAY</CODE></A></DL></DD></DL><HR><A NAME="HOUR_OF_DAY"><!-- --></A><H3>HOUR_OF_DAY</H3><PRE>public static final int <B>HOUR_OF_DAY</B></PRE><DL><DD>Field number for <code>get</code> and <code>set</code> indicating the hour of the day. <code>HOUR_OF_DAY</code> is used for the 24-hour clock. E.g., at 10:04:15.250 PM the <code>HOUR_OF_DAY</code> is 22.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/util/Calendar.html#HOUR"><CODE>HOUR</CODE></A></DL></DD></DL><HR><A NAME="MINUTE"><!-- --></A><H3>MINUTE</H3><PRE>public static final int <B>MINUTE</B></PRE><DL><DD>Field number for <code>get</code> and <code>set</code> indicating the minute within the hour. E.g., at 10:04:15.250 PM the <code>MINUTE</code> is 4.</DL><HR><A NAME="SECOND"><!-- --></A><H3>SECOND</H3><PRE>public static final int <B>SECOND</B></PRE><DL><DD>Field number for <code>get</code> and <code>set</code> indicating the second within the minute. E.g., at 10:04:15.250 PM the <code>SECOND</code> is 15.</DL><HR><A NAME="MILLISECOND"><!-- --></A><H3>MILLISECOND</H3><PRE>public static final int <B>MILLISECOND</B></PRE><DL><DD>Field number for <code>get</code> and <code>set</code> indicating the millisecond within the second. E.g., at 10:04:15.250 PM the <code>MILLISECOND</code> is 250.</DL><HR><A NAME="ZONE_OFFSET"><!-- --></A><H3>ZONE_OFFSET</H3><PRE>public static final int <B>ZONE_OFFSET</B></PRE><DL><DD>Field number for <code>get</code> and <code>set</code> indicating the raw offset from GMT in milliseconds.</DL><HR><A NAME="DST_OFFSET"><!-- --></A><H3>DST_OFFSET</H3><PRE>public static final int <B>DST_OFFSET</B></PRE><DL><DD
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -