head 1.1; branch 1.1.1; access ; symbols DEVEL:1.1.1.1 HEAD:1.1.1; locks ; strict; comment @# @; 1.1 date 2001.03.16.18.13.09; author jallali; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2001.03.16.18.13.09; author jallali; state Exp; branches ; next ; desc @@ 1.1 log @Initial revision @ text @

Overview | Package | Class | Tree | Deprecated | Index | Help
| EJCL Xtreme for PalmOS
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## java.util
Class Date

    java.lang.Object
      |
      +--java.util.Date

public class Date
extends Object
implements Serializable, Cloneable

Date represents a specific moment in time, to the millisecond.

See Also:
  `System.currentTimeMillis()`, Serialized Form

Constructor Summary
`Date()` Initializes this Date instance to the current date and time.
`Date(int year, int month, int day)` Deprecated. use GregorianCalendar(int, int, int)
`Date(int year, int month, int day, int hour, int minute, int second)` Deprecated. use GregorianCalendar(int, int, int, int, int, int)
`Date(long milliseconds)` Initializes this Date instance using the specified millisecond value.

Method Summary
`boolean` | `equals(Object object)` Compares the specified object to this Date and answer if they are equal.
`int` | `getDate()` Deprecated. use Calendar.get(Calendar.DATE)
`int` | `getDay()` Deprecated. use Calendar.get(Calendar.DAY_OF_WEEK)
`int` | `getHours()` Deprecated. use Calendar.get(Calendar.HOUR_OF_DAY)
`int` | `getMinutes()` Deprecated. use Calendar.get(Calendar.MINUTE)
`int` | `getMonth()` Deprecated. use Calendar.get(Calendar.MONTH)
`int` | `getSeconds()` Deprecated. use Calendar.get(Calendar.SECOND)
`long` | `getTime()` Answers this Date as a millisecond value.
`int` | `getYear()` Deprecated. use Calendar.get(Calendar.YEAR) - 1900
`int` | `hashCode()` Answers an integer hash code for the receiver.
`void` | `setDate(int day)` Deprecated. use Calendar.set(Calendar.DATE, day)
`void` | `setHours(int hour)` Deprecated. use Calendar.set(Calendar.HOUR_OF_DAY, hour)
`void` | `setMinutes(int minute)` Deprecated. use Calendar.set(Calendar.MINUTE, minute)
`void` | `setMonth(int month)` Deprecated. use Calendar.set(Calendar.MONTH, month)
`void` | `setSeconds(int second)` Deprecated. use Calendar.set(Calendar.SECOND, second)
`void` | `setTime(long milliseconds)` Sets this Date to the specified millisecond value.
`void` | `setYear(int year)` Deprecated. use Calendar.set(Calendar.YEAR, year + 1900)
`String` | `toString()` Answers the string representation of this Date in the format: Tue Jun 22 13:07:00 GMT 1999

Methods inherited from class java.lang.Object
`clone, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Date

    public Date()

  Initializes this Date instance to the current date and time.

### Date

    public Date(int year,
                int month,
                int day)

  Deprecated. use GregorianCalendar(int, int, int)

  Constructs a new Date initialized to midnight in the default TimeZone on the specified date.
  Parameters:
    `year` - the year, 0 is 1900
    `month` - the month, 0 - 11
    `day` - the day of the month, 1 - 31

### Date

    public Date(int year,
                int month,
                int day,
                int hour,
                int minute,
                int second)

  Deprecated. use GregorianCalendar(int, int, int, int, int, int)

  Constructs a new Date initialized to the specified date and time in the default TimeZone.
  Parameters:
    `year` - the year, 0 is 1900
    `month` - the month, 0 - 11
    `day` - the day of the month, 1 - 31
    `hour` - the hour of day, 0 - 23
    `minute` - the minute of the hour, 0 - 59
    `second` - the second of the minute, 0 - 59

### Date

    public Date(long milliseconds)

  Initializes this Date instance using the specified millisecond value. The value is the number of milliseconds since Jan. 1, 1970 GMT.
  Parameters:
    `milliseconds` - the number of milliseconds since Jan. 1, 1970 GMT

Method Detail

### equals

    public boolean equals(Object object)

  Compares the specified object to this Date and answer if they are equal. The object must be an instance of Date and have the same millisecond value.
  Overrides:
    equals in class Object
  Parameters:
    `object` - the object to compare with this object
  Returns:
    true if the specified object is equal to this Date, false otherwise
  See Also:
    `hashCode()`

### getDate

    public int getDate()

  Deprecated. use Calendar.get(Calendar.DATE)

  Answers the gregorian calendar day of the month for this Date object.
  Returns:
    the day of the month

### getDay

    public int getDay()

  Deprecated. use Calendar.get(Calendar.DAY_OF_WEEK)

  Answers the gregorian calendar day of the week for this Date object.
  Returns:
    the day of the week

### getHours

    public int getHours()

  Deprecated. use Calendar.get(Calendar.HOUR_OF_DAY)

  Answers the gregorian calendar hour of the day for this Date object.
  Returns:
    the hour of the day

### getMinutes

    public int getMinutes()

  Deprecated. use Calendar.get(Calendar.MINUTE)

  Answers the gregorian calendar minute of the hour for this Date object.
  Returns:
    the minutes

### getMonth

    public int getMonth()

  Deprecated. use Calendar.get(Calendar.MONTH)

  Answers the gregorian calendar month for this Date object.
  Returns:
    the month

### getSeconds

    public int getSeconds()

  Deprecated. use Calendar.get(Calendar.SECOND)

  Answers the gregorian calendar second of the minute for this Date object.
  Returns:
    the seconds

### getTime

    public long getTime()

  Answers this Date as a millisecond value. The value is the number of milliseconds since Jan. 1, 1970 GMT.
  Returns:
    the number of milliseconds since Jan. 1, 1970 GMT.

### getYear

    public int getYear()

  Deprecated. use Calendar.get(Calendar.YEAR) - 1900

  Answers the gregorian calendar year since 1900 for this Date object.
  Returns:
    the year - 1900

### hashCode

    public int hashCode()

  Answers an integer hash code for the receiver. Objects which are equal answer the same value for this method.
  Overrides:
    hashCode in class Object
  Returns:
    the receiver's hash
  See Also:
    `equals(java.lang.Object)`

### setDate

    public void setDate(int day)

  Deprecated. use Calendar.set(Calendar.DATE, day)

  Sets the gregorian calendar day of the month for this Date object.
  Parameters:
    `day` - the day of the month

### setHours

    public void setHours(int hour)

  Deprecated. use Calendar.set(Calendar.HOUR_OF_DAY, hour)

  Sets the gregorian calendar hour of the day for this Date object.
  Parameters:
    `hour` - the hour of the day

### setMinutes

    public void setMinutes(int minute)

  Deprecated. use Calendar.set(Calendar.MINUTE, minute)

  Sets the gregorian calendar minute of the hour for this Date object.
  Parameters:
    `minute` - the minutes

### setMonth

    public void setMonth(int month)

  Deprecated. use Calendar.set(Calendar.MONTH, month)

  Sets the gregorian calendar month for this Date object.
  Parameters:
    `month` - the month

### setSeconds

    public void setSeconds(int second)

  Deprecated. use Calendar.set(Calendar.SECOND, second)

  Sets the gregorian calendar second of the minute for this Date object.
  Parameters:
    `second` - the seconds

### setTime

    public void setTime(long milliseconds)

  Sets this Date to the specified millisecond value. The value is the number of milliseconds since Jan. 1, 1970 GMT.
  Parameters:
    `milliseconds` - the number of milliseconds since Jan. 1, 1970 GMT.

### setYear

    public void setYear(int year)

  Deprecated. use Calendar.set(Calendar.YEAR, year + 1900)

  Sets the gregorian calendar year since 1900 for this Date object.
  Parameters:
    `year` - the year since 1900

### toString

    public String toString()

  Answers the string representation of this Date in the format: Tue Jun 22 13:07:00 GMT 1999
  Overrides:
    toString in class Object
  Returns:
    the string representation of this Date

Overview | Package | Class | Tree | Deprecated | Index | Help
| EJCL Xtreme for PalmOS
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

@ 1.1.1.1 log @import initial @ text @@