<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Wed Jul 28 01:21:15 GMT 1999 -->
<title>
  Class java.util.Date
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.util.html">This Package</a>  <a href="java.util.Calendar.html#_top_">Previous</a>  <a href="java.util.Dictionary.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.util.Date
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----java.util.Date
</pre>
<hr>
<dl>
  <dt> public class <b>Date</b>
  <dt> extends <a href="java.lang.Object.html#_top_">Object</a>
  <dt> implements <a href="java.io.Serializable.html#_top_">Serializable</a>, <a href="java.lang.Cloneable.html#_top_">Cloneable</a>
</dl>
The class <code>Date</code> represents a specific instant
 in time, with millisecond precision.
 <p>
 Prior to JDK&nbsp;1.1, the class <code>Date</code> had two additional
 functions.  It allowed the interpretation of dates as year, month, day, hour,
 minute, and second values.  It also allowed the formatting and parsing
 of date strings.  Unfortunately, the API for these functions was not
 amenable to internationalization.  As of JDK&nbsp;1.1, the
 <code>Calendar</code> class should be used to convert between dates and time
 fields and the <code>DateFormat</code> class should be used to format and
 parse date strings.
 The corresponding methods in <code>Date</code> are deprecated.
 <p>
 Although the <code>Date</code> class is intended to reflect
 coordinated universal time (UTC), it may not do so exactly,
 depending on the host environment of the Java Virtual Machine.
 Nearly all modern operating systems assume that 1&nbsp;day&nbsp;=
 24&nbsp;&times;&nbsp;60&nbsp;&times;&nbsp;60&nbsp;= 86400 seconds
 in all cases. In UTC, however, about once every year or two there
 is an extra second, called a "leap second." The leap
 second is always added as the last second of the day, and always
 on December 31 or June 30. For example, the last minute of the
 year 1995 was 61 seconds long, thanks to an added leap second.
 Most computer clocks are not accurate enough to be able to reflect
 the leap-second distinction.
 <p>
 Some computer standards are defined in terms of Greenwich mean
 time (GMT), which is equivalent to universal time (UT).  GMT is
 the "civil" name for the standard; UT is the
 "scientific" name for the same standard. The
 distinction between UTC and UT is that UTC is based on an atomic
 clock and UT is based on astronomical observations, which for all
 practical purposes is an invisibly fine hair to split. Because the
 earth's rotation is not uniform (it slows down and speeds up
 in complicated ways), UT does not always flow uniformly. Leap
 seconds are introduced as needed into UTC so as to keep UTC within
 0.9 seconds of UT1, which is a version of UT with certain
 corrections applied. There are other time and date systems as
 well; for example, the time scale used by the satellite-based
 global positioning system (GPS) is synchronized to UTC but is
 <i>not</i> adjusted for leap seconds. An interesting source of
 further information is the U.S. Naval Observatory, particularly
 the Directorate of Time at:
 <ul><code>
     http://tycho.usno.navy.mil
 </code></ul>
 <p>
 and their definitions of "Systems of Time" at:
 <ul><code>http://tycho.usno.navy.mil/systime.html
 </code></ul>
 <p>
 In all methods of class <code>Date</code> that accept or return
 year, month, date, hours, minutes, and seconds values, the
 following representations are used:
 <ul>
 <li>A year <i>y</i> is represented by the integer
     <i>y</i>&nbsp;<code>-&nbsp;1900</code>.
 <li>A month is represented by an integer form 0 to 11; 0 is January,
     1 is February, and so forth; thus 11 is December.
 <li>A date (day of month) is represented by an integer from 1 to 31
     in the usual manner.
 <li>An hour is represented by an integer from 0 to 23. Thus, the hour
     from midnight to 1 a.m. is hour 0, and the hour from noon to 1
     p.m. is hour 12.
 <li>A minute is represented by an integer from 0 to 59 in the usual manner.
 <li>A second is represented by an integer from 0 to 60; the value 60 occurs
     only for leap seconds and even then only in Java implementations that
     actually track leap seconds correctly.
 </ul>
 <p>
 In all cases, arguments given to methods for these purposes need
 not fall within the indicated ranges; for example, a date may be
 specified as January 32 and is interpreted as meaning February 1.
<p>
<dl>
    <dt> <b>See Also:</b>
    <dd> <a href="java.text.DateFormat.html#_top_">DateFormat</a>, <a href="java.util.Calendar.html#_top_">Calendar</a>, <a href="java.util.TimeZone.html#_top_">TimeZone</a>
</dl>
<hr>
<a name="index"></a>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#Date()"><b>Date</b></a>()
  <dd>  Allocates a <code>Date</code> object and initializes it so that
 it represents the time at which it was allocated measured to the
 nearest millisecond.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#Date(int, int, int)"><b>Date</b></a>(int, int, int)
  <dd>  Allocates a <code>Date</code> object and initializes it so that
 it represents midnight, local time, at the beginning of the day
 specified by the <code>year</code>, <code>month</code>, and
 <code>date</code> arguments.
<b>Deprecated.</b>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#Date(int, int, int, int, int)"><b>Date</b></a>(int, int, int, int, int)
  <dd>  Allocates a <code>Date</code> object and initializes it so that
 it represents the specified hour and minute, local time, of the
 date specified by the <code>year</code>, <code>month</code>,
 <code>date</code>, <code>hrs</code>, and <code>min</code> arguments.
<b>Deprecated.</b>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#Date(int, int, int, int, int, int)"><b>Date</b></a>(int, int, int, int, int, int)
  <dd>  Allocates a <code>Date</code> object and initializes it so that
 it represents the specified hour, minute, and second, local time
 of the date specified by the <code>year</code>, <code>month</code>,
 <code>date</code>, <code>hrs</code>, <code>min</code>, and
 <code>sec</code> arguments.
<b>Deprecated.</b>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#Date(long)"><b>Date</b></a>(long)
  <dd>  Allocates a <code>Date</code> object and initializes it to
 represent the specified number of milliseconds since January 1,
 1970, 00:00:00 GMT.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#Date(java.lang.String)"><b>Date</b></a>(String)
  <dd>  Allocates a <code>Date</code> object and initializes it so that
 it represents the date and time indicated by the string
 <code>s</code>, which is interpreted as if by the
 <code>parse</code> method.
<b>Deprecated.</b>
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#after(java.util.Date)"><b>after</b></a>(Date)
  <dd>  Tests if this date is after the specified date.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#before(java.util.Date)"><b>before</b></a>(Date)
  <dd>  Tests if this date is before the specified date.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#equals(java.lang.Object)"><b>equals</b></a>(Object)
  <dd>  Compares two dates.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getDate()"><b>getDate</b></a>()
  <dd>  Returns the day of the month represented by this date.
<b>Deprecated.</b>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getDay()"><b>getDay</b></a>()
  <dd>  Returns the day of the week represented by this date.
<b>Deprecated.</b>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getHours()"><b>getHours</b></a>()
  <dd>  Returns the hour represented by this date.
<b>Deprecated.</b>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getMinutes()"><b>getMinutes</b></a>()
  <dd>  Returns the number of minutes past the hour represented by this date.
<b>Deprecated.</b>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getMonth()"><b>getMonth</b></a>()
  <dd>  Returns the month represented by this date.
<b>Deprecated.</b>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getSeconds()"><b>getSeconds</b></a>()
  <dd>  Returns the number of seconds past the minute represented by this date.
<b>Deprecated.</b>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getTime()"><b>getTime</b></a>()
  <dd>  Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT
 represented by this date.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getTimezoneOffset()"><b>getTimezoneOffset</b></a>()
  <dd>  Returns the local time-zone offset.
<b>Deprecated.</b>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getYear()"><b>getYear</b></a>()
  <dd>  Returns the year represented by this date, minus 1900.
<b>Deprecated.</b>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#hashCode()"><b>hashCode</b></a>()
  <dd>  Returns a hash code value for this object.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#parse(java.lang.String)"><b>parse</b></a>(String)
  <dd>  Given a string representing a time, parse it and return the time
 value.
<b>Deprecated.</b>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setDate(int)"><b>setDate</b></a>(int)
  <dd>  Sets the day of the month of this date to the specified value.
<b>Deprecated.</b>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setHours(int)"><b>setHours</b></a>(int)
  <dd>  Sets the hour of this date to the specified value.
<b>Deprecated.</b>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setMinutes(int)"><b>setMinutes</b></a>(int)
  <dd>  Sets the minutes of this date to the specified value.
<b>Deprecated.</b>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setMonth(int)"><b>setMonth</b></a>(int)
  <dd>  Sets the month of this date to the specified value.
<b>Deprecated.</b>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setSeconds(int)"><b>setSeconds</b></a>(int)
  <dd>  Sets the seconds of this date to the specified value.
<b>Deprecated.</b>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setTime(long)"><b>setTime</b></a>(long)
  <dd>  Sets this date to represent the specified number of milliseconds
 since January 1, 1970, 00:00:00 GMT.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setYear(int)"><b>setYear</b></a>(int)
  <dd>  Sets the year of this date to be the specified value plus 1900.
<b>Deprecated.</b>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#toGMTString()"><b>toGMTString</b></a>()
  <dd>  Creates a string representation of this date.
<b>Deprecated.</b>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#toLocaleString()"><b>toLocaleString</b></a>()
  <dd>  Creates a string representation of this date in an
 implementation-dependent form.
<b>Deprecated.</b>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#toString()"><b>toString</b></a>()
  <dd>  Creates a canonical string representation of the date.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#UTC(int, int, int, int, int, int)"><b>UTC</b></a>(int, int, int, int, int, int)
  <dd>  Determines the date and time based on the arguments.
<b>Deprecated.</b>
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="Date"></a>
<a name="Date()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>Date</b>
<pre>
 public Date()
</pre>
<dl>
  <dd> Allocates a <code>Date</code> object and initializes it so that
 it represents the time at which it was allocated measured to the
 nearest millisecond.
<p>
  <dd><dl>
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.System.html#currentTimeMillis()">currentTimeMillis</a>
  </dl></dd>
</dl>
<a name="Date(long)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>Date</b>
<pre>
 public Date(long date)
</pre>
<dl>
  <dd> Allocates a <code>Date</code> object and initializes it to
 represent the specified number of milliseconds since January 1,
 1970, 00:00:00 GMT.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> date - the milliseconds since January 1, 1970, 00:00:00 GMT.
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.System.html#currentTimeMillis()">currentTimeMillis</a>
  </dl></dd>
</dl>
<a name="Date(int, int, int)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>Date</b>
<pre>
 public Date(int year,
             int month,
             int date)
</pre>
<dl>
<dd><b> Note: Date() is deprecated.</b>
<i>As of JDK version 1.1,
 replaced by <code>Calendar.set(year + 1900, month, date)</code>
 or <code>GregorianCalendar(year + 1900, month, date)</code>.</i>
<p>
  <dd> Allocates a <code>Date</code> object and initializes it so that
 it represents midnight, local time, at the beginning of the day
 specified by the <code>year</code>, <code>month</code>, and
 <code>date</code> arguments.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> year - the year minus 1900.
    <dd> month - the month between 0-11.
    <dd> date - the day of the month between 1-31.
    <dt> <b>See Also:</b>
    <dd> <a href="java.util.Calendar.html#_top_">Calendar</a>
  </dl></dd>
</dl>
<a name="Date(int, int, int, int, int)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>Date</b>
<pre>
 public Date(int year,
             int month,
             int date,
             int hrs,
             int min)
</pre>
<dl>
<dd><b> Note: Date() is deprecated.</b>
<i>As of JDK version 1.1,
 replaced by <code>Calendar.set(year + 1900, month, date,
 hrs, min)</code> or <code>GregorianCalendar(year + 1900,
 month, date, hrs, min)</code>.</i>
<p>
  <dd> Allocates a <code>Date</code> object and initializes it so that
 it represents the specified hour and minute, local time, of the
 date specified by the <code>year</code>, <code>month</code>,
 <code>date</code>, <code>hrs</code>, and <code>min</code> arguments.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> year - the year minus 1900.
    <dd> month - the month between 0-11.
    <dd> date - the day of the month between 1-31.
    <dd> hrs - the hours between 0-23.
    <dd> min - the minutes between 0-59.
    <dt> <b>See Also:</b>
    <dd> <a href="java.util.Calendar.html#_top_">Calendar</a>
  </dl></dd>
</dl>
<a name="Date(int, int, int, int, int, int)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>Date</b>
<pre>
 public Date(int year,
             int month,
             int date,
             int hrs,
             int min,
             int sec)
</pre>
<dl>
<dd><b> Note: Date() is deprecated.</b>
<i>As of JDK version 1.1,
 replaced by <code>Calendar.set(year + 1900, month, date,
 hrs, min, sec)</code> or <code>GregorianCalendar(year + 1900,
 month, date, hrs, min, sec)</code>.</i>
<p>
  <dd> Allocates a <code>Date</code> object and initializes it so that
 it represents the specified hour, minute, and second, local time
 of the date specified by the <code>year</code>, <code>month</code>,
 <code>date</code>, <code>hrs</code>, <code>min</code>, and
 <code>sec</code> arguments.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> year - the year minus 1900.
    <dd> month - the month between 0-11.
    <dd> date - the day of the month between 1-31.
    <dd> hrs - the hours between 0-23.
    <dd> min - the minutes between 0-59.
    <dd> sec - the seconds between 0-59.
    <dt> <b>See Also:</b>
    <dd> <a href="java.util.Calendar.html#_top_">Calendar</a>
  </dl></dd>
</dl>
<a name="Date(java.lang.String)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>Date</b>
<pre>
 public Date(<a href="java.lang.String.html#_top_">String</a> s)
</pre>
<dl>
<dd><b> Note: Date() is deprecated.</b>
<i>As of JDK version 1.1,
 replaced by <code>DateFormat.parse(String s)</code>.</i>
<p>
  <dd> Allocates a <code>Date</code> object and initializes it so that
 it represents the date and time indicated by the string
 <code>s</code>, which is interpreted as if by the
 <code>parse</code> method.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> s - a string representation of the date.
    <dt> <b>See Also:</b>
    <dd> <a href="java.text.DateFormat.html#_top_">DateFormat</a>, <a href="#parse(java.lang.String)">parse</a>
  </dl></dd>
</dl>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="UTC(int, int, int, int, int, int)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="UTC"><b>UTC</b></a>
<pre>
 public static long UTC(int year,
                        int month,
                        int date,
                        int hrs,
                        int min,
                        int sec)
</pre>
<dl>
<dd><b> Note: UTC() is deprecated.</b>
<i>As of JDK version 1.1,
 replaced by <code>Calendar.set(year + 1900, month, date,
 hrs, min, sec)</code> or <code>GregorianCalendar(year + 1900,
 month, date, hrs, min, sec)</code>, using a UTC
 <code>TimeZone</code>, followed by <code>Calendar.getTime().getTime()</code>.</i>
<p>
  <dd> Determines the date and time based on the arguments. The
 arguments are interpreted in UTC, not in the local time zone
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> year - the year minus 1900.
    <dd> month - the month between 0-11.
    <dd> date - the day of the month between 1-31.
    <dd> hrs - the hours between 0-23.
    <dd> min - the minutes between 0-59.
    <dd> sec - the seconds between 0-59.
    <dt> <b>Returns:</b>
    <dd> the number of milliseconds since January 1, 1970, 00:00:00 GMT for
          the date and time specified by the arguments.
    <dt> <b>See Also:</b>
    <dd> <a href="java.util.Calendar.html#_top_">Calendar</a>
  </dl></dd>
</dl>
<a name="parse(java.lang.String)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="parse"><b>parse</b></a>
<pre>
 public static long parse(<a href="java.lang.String.html#_top_">String</a> s)
</pre>
<dl>
<dd><b> Note: parse() is deprecated.</b>
<i>As of JDK version 1.1,
 replaced by <code>DateFormat.parse(String s)</code>.</i>
<p>
  <dd> Given a string representing a time, parse it and return the time
 value. This method recognizes most standard syntaxes.
 <p>
 It accepts many syntaxes; in particular, it recognizes the IETF
 standard date syntax: "Sat, 12 Aug 1995 13:30:00 GMT". It also
 understands the continental U.S. time-zone abbreviations, but for
 general use, a time-zone offset should be used: "Sat, 12 Aug 1995
 13:30:00 GMT+0430" (4 hours, 30 minutes west of the Greenwich
 meridian). If no time zone is specified, the local time zone is
 assumed. GMT and UTC are considered equivalent.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> s - a string to be parsed as a date.
    <dt> <b>Returns:</b>
    <dd> the number of milliseconds since January 1, 1970, 00:00:00 GMT
          represented by the string argument.
    <dt> <b>See Also:</b>
    <dd> <a href="java.text.DateFormat.html#_top_">DateFormat</a>
  </dl></dd>
</dl>
<a name="getYear()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getYear"><b>getYear</b></a>
<pre>
 public int getYear()
</pre>
<dl>
<dd><b> Note: getYear() is deprecated.</b>
<i>As of JDK version 1.1,
 replaced by <code>Calendar.get(Calendar.YEAR) - 1900</code>.</i>
<p>
  <dd> Returns the year represented by this date, minus 1900.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the year represented by this date, minus 1900.
    <dt> <b>See Also:</b>
    <dd> <a href="java.util.Calendar.html#_top_">Calendar</a>
  </dl></dd>
</dl>
<a name="setYear(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setYear"><b>setYear</b></a>
<pre>
 public void setYear(int year)
</pre>
<dl>
<dd><b> Note: setYear() is deprecated.</b>
<i>As of JDK version 1.1,
 replaced by <code>Calendar.set(Calendar.YEAR, year + 1900)</code>.</i>
<p>
  <dd> Sets the year of this date to be the specified value plus 1900.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> year - the year value.
    <dt> <b>See Also:</b>
    <dd> <a href="java.util.Calendar.html#_top_">Calendar</a>
  </dl></dd>
</dl>
<a name="getMonth()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getMonth"><b>getMonth</b></a>
<pre>
 public int getMonth()
</pre>
<dl>
<dd><b> Note: getMonth() is deprecated.</b>
<i>As of JDK version 1.1,
 replaced by <code>Calendar.get(Calendar.MONTH)</code>.</i>
<p>
  <dd> Returns the month represented by this date. The value returned is
 between <code>0</code> and <code>11</code>, with the value
 <code>0</code> representing January.
<p>
  <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#_top_">Calendar</a>
  </dl></dd>
</dl>
<a name="setMonth(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setMonth"><b>setMonth</b></a>
<pre>
 public void setMonth(int month)
</pre>
<dl>
<dd><b> Note: setMonth() is deprecated.</b>
<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.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> month - the month value between 0-11.
    <dt> <b>See Also:</b>
    <dd> <a href="java.util.Calendar.html#_top_">Calendar</a>
  </dl></dd>
</dl>
<a name="getDate()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getDate"><b>getDate</b></a>
<pre>
 public int getDate()
</pre>
<dl>
<dd><b> Note: getDate() is deprecated.</b>
<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 date. The value
 returned is between <code>1</code> and <code>31</code>.
<p>
  <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#_top_">Calendar</a>
  </dl></dd>
</dl>
<a name="setDate(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setDate"><b>setDate</b></a>
<pre>
 public void setDate(int date)
</pre>
<dl>
<dd><b> Note: setDate() is deprecated.</b>
<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 date to the specified value.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> date - the day of the month value between 1-31.
    <dt> <b>See Also:</b>
    <dd> <a href="java.util.Calendar.html#_top_">Calendar</a>
  </dl></dd>
</dl>
<a name="getDay()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getDay"><b>getDay</b></a>
<pre>
 public int getDay()
</pre>
<dl>
<dd><b> Note: getDay() is deprecated.</b>
<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 value returned
 is between <code>0</code> and <code>6</code>, where <code>0</code>
 represents Sunday.
<p>
  <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#_top_">Calendar</a>
  </dl></dd>
</dl>
<a name="getHours()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getHours"><b>getHours</b></a>
<pre>
 public int getHours()
</pre>
<dl>
<dd><b> Note: getHours() is deprecated.</b>
<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 date. The value returned is between
 <code>0</code> and <code>23</code>, where <code>0</code> represents
 midnight.
<p>
  <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#_top_">Calendar</a>
  </dl></dd>
</dl>
<a name="setHours(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setHours"><b>setHours</b></a>
<pre>
 public void setHours(int hours)
</pre>
<dl>
<dd><b> Note: setHours() is deprecated.</b>
<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 date to the specified value.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> hours - the hour value.
    <dt> <b>See Also:</b>
    <dd> <a href="java.util.Calendar.html#_top_">Calendar</a>
  </dl></dd>
</dl>
<a name="getMinutes()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getMinutes"><b>getMinutes</b></a>
<pre>
 public int getMinutes()
</pre>
<dl>
<dd><b> Note: getMinutes() is deprecated.</b>
<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.
 The value returned is between <code>0</code> and <code>59</code>.
<p>
  <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#_top_">Calendar</a>
  </dl></dd>
</dl>
<a name="setMinutes(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setMinutes"><b>setMinutes</b></a>
<pre>
 public void setMinutes(int minutes)
</pre>
<dl>
<dd><b> Note: setMinutes() is deprecated.</b>
<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 date to the specified value.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> minutes - the value of the minutes.
    <dt> <b>See Also:</b>
    <dd> <a href="java.util.Calendar.html#_top_">Calendar</a>
  </dl></dd>
</dl>
<a name="getSeconds()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getSeconds"><b>getSeconds</b></a>
<pre>
 public int getSeconds()
</pre>
<dl>
<dd><b> Note: getSeconds() is deprecated.</b>
<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>60</code>. The
 value <code>60</code> can only occur on those Java Virtual Machines that
 take leap seconds into account.
<p>
  <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#_top_">Calendar</a>
  </dl></dd>
</dl>
<a name="setSeconds(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setSeconds"><b>setSeconds</b></a>
<pre>
 public void setSeconds(int seconds)
</pre>
<dl>
<dd><b> Note: setSeconds() is deprecated.</b>
<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 date to the specified value.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> seconds - the seconds value.
    <dt> <b>See Also:</b>
    <dd> <a href="java.util.Calendar.html#_top_">Calendar</a>
  </dl></dd>
</dl>
<a name="getTime()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getTime"><b>getTime</b></a>
<pre>
 public long getTime()
</pre>
<dl>
  <dd> Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT
 represented by this date.
<p>
  <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>
<a name="setTime(long)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setTime"><b>setTime</b></a>
<pre>
 public void setTime(long time)
</pre>
<dl>
  <dd> Sets this date to represent the specified number of milliseconds
 since January 1, 1970, 00:00:00 GMT.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> time - the number of milliseconds.
  </dl></dd>
</dl>
<a name="before(java.util.Date)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="before"><b>before</b></a>
<pre>
 public boolean before(<a href="#_top_">Date</a> when)
</pre>
<dl>
  <dd> Tests if this date is before the specified date.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> when - a date.
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if this date is before the argument date;
          <code>false</code> otherwise.
  </dl></dd>
</dl>
<a name="after(java.util.Date)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="after"><b>after</b></a>
<pre>
 public boolean after(<a href="#_top_">Date</a> when)
</pre>
<dl>
  <dd> Tests if this date is after the specified date.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> when - a date.
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if this date is after the argument date;
          <code>false</code> otherwise.
  </dl></dd>
</dl>
<a name="equals(java.lang.Object)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="equals"><b>equals</b></a>
<pre>
 public boolean equals(<a href="java.lang.Object.html#_top_">Object</a> obj)
</pre>
<dl>
  <dd> Compares two dates.
 The result is <code>true</code> if and only if the argument is
 not <code>null</code> and is a <code>Date</code> object that
 represents the same point in time, to the millisecond, as this object.
 <p>
 Thus, two <code>Date</code> objects are equal if and only if the
 <code>getTime</code> method returns the same <code>long</code>
 value for both.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> obj - the object to compare with.
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if the objects are the same;
          <code>false</code> otherwise.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.lang.Object.html#equals(java.lang.Object)">equals</a> in class <a href="java.lang.Object.html#_top_">Object</a>
    <dt> <b>See Also:</b>
    <dd> <a href="#getTime()">getTime</a>
  </dl></dd>
</dl>
<a name="hashCode()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="hashCode"><b>hashCode</b></a>
<pre>
 public int hashCode()
</pre>
<dl>
  <dd> Returns a hash code value for this object.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a hash code value for this object.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.lang.Object.html#hashCode()">hashCode</a> in class <a href="java.lang.Object.html#_top_">Object</a>
  </dl></dd>
</dl>
<a name="toString()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="toString"><b>toString</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> toString()
</pre>
<dl>
  <dd> Creates a canonical string representation of the date. The result
 is of the form <code>"Sat Aug 12 02:30:00 PDT 1995"</code>.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a string representation of this date.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.lang.Object.html#toString()">toString</a> in class <a href="java.lang.Object.html#_top_">Object</a>
  </dl></dd>
</dl>
<a name="toLocaleString()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="toLocaleString"><b>toLocaleString</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> toLocaleString()
</pre>
<dl>
<dd><b> Note: toLocaleString() is deprecated.</b>
<i>As of JDK version 1.1,
 replaced by <code>DateFormat.format(Date date)</code>.</i>
<p>
  <dd> Creates a string representation of this date in an
 implementation-dependent form. The intent is that the form should
 be familiar to the user of the Java application, wherever it may
 happen to be running. The intent is comparable to that of the
 "<code>%c</code>" format supported by the <code>strftime()</code>
 function of ISO&nbsp;C.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a string representation of this date, using the locale
          conventions.
    <dt> <b>See Also:</b>
    <dd> <a href="java.text.DateFormat.html#_top_">DateFormat</a>
  </dl></dd>
</dl>
<a name="toGMTString()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="toGMTString"><b>toGMTString</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> toGMTString()
</pre>
<dl>
<dd><b> Note: toGMTString() is deprecated.</b>
<i>As of JDK version 1.1,
 replaced by <code>DateFormat.format(Date date)</code>, using a
 GMT <code>TimeZone</code>.</i>
<p>
  <dd> Creates a string representation of this date. The result is of the form:
 <ul><code>
     "12 Aug 1995 02:30:00 GMT"
 </code></ul>
 <p>
 in which the day of the month is always one or two digits. The
 other fields have exactly the width shown. The time zone is always
 given as "GMT".
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a string representation of this date, using the Internet GMT
          conventions.
    <dt> <b>See Also:</b>
    <dd> <a href="java.text.DateFormat.html#_top_">DateFormat</a>
  </dl></dd>
</dl>
<a name="getTimezoneOffset()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getTimezoneOffset"><b>getTimezoneOffset</b></a>
<pre>
 public int getTimezoneOffset()
</pre>
<dl>
<dd><b> Note: getTimezoneOffset() is deprecated.</b>
<i>As of JDK version 1.1,
 replaced by <code>Calendar.get(Calendar.ZONE_OFFSET) +
 Calendar.get(Calendar.DST_OFFSET)</code>.</i>
<p>
  <dd> Returns the local time-zone offset. The time-zone offset is
 the number of minutes that must be added to GMT to give the local
 time zone. This value includes the correction, if necessary, for
 daylight saving time.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the time-zone offset, in minutes, for the current locale.
    <dt> <b>See Also:</b>
    <dd> <a href="java.util.Calendar.html#_top_">Calendar</a>, <a href="java.util.TimeZone.html#_top_">TimeZone</a>
  </dl></dd>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.util.html">This Package</a>  <a href="java.util.Calendar.html#_top_">Previous</a>  <a href="java.util.Dictionary.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
