⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 date.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<DD><DL><DT><B>Parameters:</B><DD><CODE>year</CODE> - the year value.<DT><B>See Also: </B><DD><A HREF="../../java/util/Calendar.html"><CODE>Calendar</CODE></A></DL></DD></DL><HR><A NAME="getMonth()"><!-- --></A><H3>getMonth</H3><PRE>public int <B>getMonth</B>()</PRE><DL><DD><B>Deprecated.</B>&nbsp;<I>As of JDK version 1.1, replaced by <code>Calendar.get(Calendar.MONTH)</code>.</I><P><DD>Returns a number representing the month that contains or begins  with the instant in time represented by this <tt>Date</tt> object.  The value returned is between <code>0</code> and <code>11</code>,  with the value <code>0</code> representing January.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the month represented by this date.<DT><B>See Also: </B><DD><A HREF="../../java/util/Calendar.html"><CODE>Calendar</CODE></A></DL></DD></DL><HR><A NAME="setMonth(int)"><!-- --></A><H3>setMonth</H3><PRE>public void <B>setMonth</B>(int&nbsp;month)</PRE><DL><DD><B>Deprecated.</B>&nbsp;<I>As of JDK version 1.1, replaced by <code>Calendar.set(Calendar.MONTH, int month)</code>.</I><P><DD>Sets the month of this date to the specified value. This  <tt>Date</tt> object is modified so that it represents a point  in time within the specified month, with the year, date, hour,  minute, and second the same as before, as interpreted in the  local time zone. If the date was October 31, for example, and  the month is set to June, then the new date will be treated as  if it were on July 1, because June has only 30 days.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>month</CODE> - the month value between 0-11.<DT><B>See Also: </B><DD><A HREF="../../java/util/Calendar.html"><CODE>Calendar</CODE></A></DL></DD></DL><HR><A NAME="getDate()"><!-- --></A><H3>getDate</H3><PRE>public int <B>getDate</B>()</PRE><DL><DD><B>Deprecated.</B>&nbsp;<I>As of JDK version 1.1, replaced by <code>Calendar.get(Calendar.DAY_OF_MONTH)</code>.</I><P><DD>Returns the day of the month represented by this <tt>Date</tt> object.  The value returned is between <code>1</code> and <code>31</code>  representing the day of the month that contains or begins with the  instant in time represented by this <tt>Date</tt> object, as  interpreted in the local time zone.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the day of the month represented by this date.<DT><B>See Also: </B><DD><A HREF="../../java/util/Calendar.html"><CODE>Calendar</CODE></A></DL></DD></DL><HR><A NAME="setDate(int)"><!-- --></A><H3>setDate</H3><PRE>public void <B>setDate</B>(int&nbsp;date)</PRE><DL><DD><B>Deprecated.</B>&nbsp;<I>As of JDK version 1.1, replaced by <code>Calendar.set(Calendar.DAY_OF_MONTH, int date)</code>.</I><P><DD>Sets the day of the month of this <tt>Date</tt> object to the  specified value. This <tt>Date</tt> object is modified so that  it represents a point in time within the specified day of the  month, with the year, month, hour, minute, and second the same  as before, as interpreted in the local time zone. If the date  was April 30, for example, and the date is set to 31, then it  will be treated as if it were on May 1, because April has only  30 days.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>date</CODE> - the day of the month value between 1-31.<DT><B>See Also: </B><DD><A HREF="../../java/util/Calendar.html"><CODE>Calendar</CODE></A></DL></DD></DL><HR><A NAME="getDay()"><!-- --></A><H3>getDay</H3><PRE>public int <B>getDay</B>()</PRE><DL><DD><B>Deprecated.</B>&nbsp;<I>As of JDK version 1.1, replaced by <code>Calendar.get(Calendar.DAY_OF_WEEK)</code>.</I><P><DD>Returns the day of the week represented by this date. The  returned value (<tt>0</tt> = Sunday, <tt>1</tt> = Monday,  <tt>2</tt> = Tuesday, <tt>3</tt> = Wednesday, <tt>4</tt> =  Thursday, <tt>5</tt> = Friday, <tt>6</tt> = Saturday)  represents the day of the week that contains or begins with  the instant in time represented by this <tt>Date</tt> object,  as interpreted in the local time zone.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the day of the week represented by this date.<DT><B>See Also: </B><DD><A HREF="../../java/util/Calendar.html"><CODE>Calendar</CODE></A></DL></DD></DL><HR><A NAME="getHours()"><!-- --></A><H3>getHours</H3><PRE>public int <B>getHours</B>()</PRE><DL><DD><B>Deprecated.</B>&nbsp;<I>As of JDK version 1.1, replaced by <code>Calendar.get(Calendar.HOUR_OF_DAY)</code>.</I><P><DD>Returns the hour represented by this <tt>Date</tt> object. The  returned value is a number (<tt>0</tt> through <tt>23</tt>)  representing the hour within the day that contains or begins  with the instant in time represented by this <tt>Date</tt>  object, as interpreted in the local time zone.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the hour represented by this date.<DT><B>See Also: </B><DD><A HREF="../../java/util/Calendar.html"><CODE>Calendar</CODE></A></DL></DD></DL><HR><A NAME="setHours(int)"><!-- --></A><H3>setHours</H3><PRE>public void <B>setHours</B>(int&nbsp;hours)</PRE><DL><DD><B>Deprecated.</B>&nbsp;<I>As of JDK version 1.1, replaced by <code>Calendar.set(Calendar.HOUR_OF_DAY, int hours)</code>.</I><P><DD>Sets the hour of this <tt>Date</tt> object to the specified value.  This <tt>Date</tt> object is modified so that it represents a point  in time within the specified hour of the day, with the year, month,  date, minute, and second the same as before, as interpreted in the  local time zone.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>hours</CODE> - the hour value.<DT><B>See Also: </B><DD><A HREF="../../java/util/Calendar.html"><CODE>Calendar</CODE></A></DL></DD></DL><HR><A NAME="getMinutes()"><!-- --></A><H3>getMinutes</H3><PRE>public int <B>getMinutes</B>()</PRE><DL><DD><B>Deprecated.</B>&nbsp;<I>As of JDK version 1.1, replaced by <code>Calendar.get(Calendar.MINUTE)</code>.</I><P><DD>Returns the number of minutes past the hour represented by this date,  as interpreted in the local time zone.  The value returned is between <code>0</code> and <code>59</code>.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the number of minutes past the hour represented by this date.<DT><B>See Also: </B><DD><A HREF="../../java/util/Calendar.html"><CODE>Calendar</CODE></A></DL></DD></DL><HR><A NAME="setMinutes(int)"><!-- --></A><H3>setMinutes</H3><PRE>public void <B>setMinutes</B>(int&nbsp;minutes)</PRE><DL><DD><B>Deprecated.</B>&nbsp;<I>As of JDK version 1.1, replaced by <code>Calendar.set(Calendar.MINUTE, int minutes)</code>.</I><P><DD>Sets the minutes of this <tt>Date</tt> object to the specified value.  This <tt>Date</tt> object is modified so that it represents a point  in time within the specified minute of the hour, with the year, month,  date, hour, and second the same as before, as interpreted in the  local time zone.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>minutes</CODE> - the value of the minutes.<DT><B>See Also: </B><DD><A HREF="../../java/util/Calendar.html"><CODE>Calendar</CODE></A></DL></DD></DL><HR><A NAME="getSeconds()"><!-- --></A><H3>getSeconds</H3><PRE>public int <B>getSeconds</B>()</PRE><DL><DD><B>Deprecated.</B>&nbsp;<I>As of JDK version 1.1, replaced by <code>Calendar.get(Calendar.SECOND)</code>.</I><P><DD>Returns the number of seconds past the minute represented by this date. The value returned is between <code>0</code> and <code>61</code>. The values <code>60</code> and <code>61</code> can only occur on those  Java Virtual Machines that take leap seconds into account.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the number of seconds past the minute represented by this date.<DT><B>See Also: </B><DD><A HREF="../../java/util/Calendar.html"><CODE>Calendar</CODE></A></DL></DD></DL><HR><A NAME="setSeconds(int)"><!-- --></A><H3>setSeconds</H3><PRE>public void <B>setSeconds</B>(int&nbsp;seconds)</PRE><DL><DD><B>Deprecated.</B>&nbsp;<I>As of JDK version 1.1, replaced by <code>Calendar.set(Calendar.SECOND, int seconds)</code>.</I><P><DD>Sets the seconds of this <tt>Date</tt> to the specified value.  This <tt>Date</tt> object is modified so that it represents a  point in time within the specified second of the minute, with  the year, month, date, hour, and minute the same as before, as  interpreted in the local time zone.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>seconds</CODE> - the seconds value.<DT><B>See Also: </B><DD><A HREF="../../java/util/Calendar.html"><CODE>Calendar</CODE></A></DL></DD></DL><HR><A NAME="getTime()"><!-- --></A><H3>getTime</H3><PRE>public long <B>getTime</B>()</PRE><DL><DD>Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this <tt>Date</tt> object.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the number of milliseconds since January 1, 1970, 00:00:00 GMT          represented by this date.</DL></DD></DL><HR><A NAME="setTime(long)"><!-- --></A><H3>setTime</H3><PRE>public void <B>setTime</B>(long&nbsp;time)</PRE><DL><DD>Sets this <tt>Date</tt> object to represent a point in time that is  <tt>time</tt> milliseconds after January 1, 1970 00:00:00 GMT.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>time</CODE> - the number of milliseconds.</DL></DD></DL><HR><A NAME="before(java.util.Date)"><!-- --></A><H3>before</H3><PRE>public boolean <B>before</B>(<A HREF="../../java/util/Date.html">Date</A>&nbsp;when)</PRE><DL><DD>Tests if this date is before the specified date.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>when</CODE> - a date.<DT><B>Returns:</B><DD><code>true</code> if and only if the instant of time             represented by this <tt>Date</tt> object is strictly             earlier than the instant represented by <tt>when</tt>;          <code>false</code> otherwise.</DL></DD></DL><HR>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -