📄 calendar.html
字号:
second within the minute.</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="../../java/util/Calendar.html#SEPTEMBER">SEPTEMBER</A></B></CODE>
<BR>
Value of the <code>MONTH</code> field indicating the ninth month of the year.</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="../../java/util/Calendar.html#SUNDAY">SUNDAY</A></B></CODE>
<BR>
Value of the <code>DAY_OF_WEEK</code> field indicating Sunday.</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="../../java/util/Calendar.html#THURSDAY">THURSDAY</A></B></CODE>
<BR>
Value of the <code>DAY_OF_WEEK</code> field indicating Thursday.</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="../../java/util/Calendar.html#TUESDAY">TUESDAY</A></B></CODE>
<BR>
Value of the <code>DAY_OF_WEEK</code> field indicating Tuesday.</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="../../java/util/Calendar.html#WEDNESDAY">WEDNESDAY</A></B></CODE>
<BR>
Value of the <code>DAY_OF_WEEK</code> field indicating Wednesday.</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="../../java/util/Calendar.html#YEAR">YEAR</A></B></CODE>
<BR>
Field number for <code>get</code> and <code>set</code> indicating the year.</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 ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected </CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/util/Calendar.html#Calendar()">Calendar</A></B>()</CODE>
<BR>
Constructs a Calendar with the default time zone and default locale.</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> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/util/Calendar.html#after(java.lang.Object)">after</A></B>(<A HREF="../../java/lang/Object.html">Object</A> when)</CODE>
<BR>
Compares the time field records.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/util/Calendar.html#before(java.lang.Object)">before</A></B>(<A HREF="../../java/lang/Object.html">Object</A> when)</CODE>
<BR>
Compares the time field records.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/util/Calendar.html#equals(java.lang.Object)">equals</A></B>(<A HREF="../../java/lang/Object.html">Object</A> obj)</CODE>
<BR>
Compares this calendar to the specified object.</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="../../java/util/Calendar.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 <A HREF="../../java/util/Calendar.html">Calendar</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/util/Calendar.html#getInstance()">getInstance</A></B>()</CODE>
<BR>
Gets a calendar using the default time zone and default locale.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static <A HREF="../../java/util/Calendar.html">Calendar</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/util/Calendar.html#getInstance(java.util.TimeZone)">getInstance</A></B>(<A HREF="../../java/util/TimeZone.html">TimeZone</A> zone)</CODE>
<BR>
Gets a calendar using the specified time zone and default locale.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../java/util/Date.html">Date</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/util/Calendar.html#getTime()">getTime</A></B>()</CODE>
<BR>
Gets this Calendar's current time.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/util/Calendar.html#getTimeInMillis()">getTimeInMillis</A></B>()</CODE>
<BR>
Gets this Calendar's current time as a long expressed in milliseconds after January 1, 1970, 0:00:00 GMT (the epoch).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../java/util/TimeZone.html">TimeZone</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/util/Calendar.html#getTimeZone()">getTimeZone</A></B>()</CODE>
<BR>
Gets the time zone.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/util/Calendar.html#set(int, int)">set</A></B>(int field, int value)</CODE>
<BR>
Sets the time field with the given value.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/util/Calendar.html#setTime(java.util.Date)">setTime</A></B>(<A HREF="../../java/util/Date.html">Date</A> date)</CODE>
<BR>
Sets this Calendar's current time with the given Date.</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="../../java/util/Calendar.html#setTimeInMillis(long)">setTimeInMillis</A></B>(long millis)</CODE>
<BR>
Sets this Calendar's current time from the given long value.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../java/util/Calendar.html#setTimeZone(java.util.TimeZone)">setTimeZone</A></B>(<A HREF="../../java/util/TimeZone.html">TimeZone</A> value)</CODE>
<BR>
Sets the time zone with the given time zone value.</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#getClass()">getClass</A>, <A HREF="../../java/lang/Object.html#hashCode()">hashCode</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#toString()">toString</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="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.</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.</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>.<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>.<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_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.</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.</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="SUNDAY"><!-- --></A><H3>
SUNDAY</H3>
<PRE>
public static final int <B>SUNDAY</B></PRE>
<DL>
<DD>Value of the <code>DAY_OF_WEEK</code> field indicating Sunday.</DL>
<HR>
<A NAME="MONDAY"><!-- --></A><H3>
MONDAY</H3>
<PRE>
public static final int <B>MONDAY</B></PRE>
<DL>
<DD>Value of the <code>DAY_OF_WEEK</code> field indicating Monday.</DL>
<HR>
<A NAME="TUESDAY"><!-- --></A><H3>
TUESDAY</H3>
<PRE>
public static final int <B>TUESDAY</B></PRE>
<DL>
<DD>Value of the <code>DAY_OF_WEEK</code> field indicating Tuesday.</DL>
<HR>
<A NAME="WEDNESDAY"><!-- --></A><H3>
WEDNESDAY</H3>
<PRE>
public static final int <B>WEDNESDAY</B></PRE>
<DL>
<DD>Value of the <code>DAY_OF_WEEK</code> field indicating Wednesday.</DL>
<HR>
<A NAME="THURSDAY"><!-- --></A><H3>
THURSDAY</H3>
<PRE>
public static final int <B>THURSDAY</B></PRE>
<DL>
<DD>Value of the <code>DAY_OF_WEEK</code> field indicating Thursday.</DL>
<HR>
<A NAME="FRIDAY"><!-- --></A><H3>
FRIDAY</H3>
<PRE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -