Package com.dassault_systemes.catjsystem

   
Class CATDate

 
Class Hierarchy
java.lang.Object
  |
  +-com.dassault_systemes.catjsystem.CATDate
Class Location

Framework : CATJSystem

Module : CATJSystem

Class Description

public class CATDate

An object that enables basic storage and retrieval of dates (not times).

Field Summary

Constructor Summary
CATDate(Date iDate)
Initializes a new instance to the specified number of milliseconds since January 1, 1970, 00:00:00 GMT.
CATDate(int year, int month, int day)
Initializes a new instance to the specified year, month, and day.
CATDate(long time)
Initializes a new instance to the specified number of milliseconds since January 1, 1970, 00:00:00 GMT.

Method Summary
public int getDate()
Returns the day of the current instance.
public int getMonth()
Returns the month of the current instance.
public long getTime()
Returns the time of the current instance as a long.
public int getYear()
Returns the year of the current instance.


Field Detail

Constructor Detail

CATDate

    CATDate(Date iDate)

Initializes a new instance to the specified number of milliseconds since January 1, 1970, 00:00:00 GMT. This value is retrieved from the java.util.Date instance passed in parameter.

Parameters:
iDate
the java.util.Date instance representing a number of milliseconds since January 1, 1970, 00:00:00 GMT. A negative number indicates the number of milliseconds before January 1, 1970, 00:00:00 GMT.

CATDate

    CATDate(int year, int month, int day)

Initializes a new instance to the specified year, month, and day.

Parameters:
year
the year value, minus 1900 (for instance, use 90 instead of 1990).
month
the month value, 0-based (0 - January to 11 - December).
day
the day value (from 1 to 31).

CATDate

    CATDate(long time)

Initializes a new instance to the specified number of milliseconds since January 1, 1970, 00:00:00 GMT.

Parameters:
time
the number of milliseconds since January 1, 1970, 00:00:00 GMT. A negative number indicates the number of milliseconds before January 1, 1970, 00:00:00 GMT.

Method Detail

getDate

    public int getDate()

Returns the day of the current instance.

Return:
the day value (from 1 to 31).

getMonth

    public int getMonth()

Returns the month of the current instance.

Return:
the month value, 0-based (0 - January to 11 - December).

getTime

    public long getTime()

Returns the time of the current instance as a long.

Return:
the number of milliseconds since January 1, 1970, 00:00:00 GMT. A negative number indicates the number of milliseconds before January 1, 1970, 00:00:00 GMT.

getYear

    public int getYear()

Returns the year of the current instance.

Return:
the year value, minus 1900 (for instance, 90 stands for 1990).


Copyright © 2000, Dassault Systèmes. All rights reserved