Java Client API Reference 6.0.2.61

com.ssaglobal.bde
Class Date

java.lang.Object
  |
  +--com.ssaglobal.bde.Date

public class Date
extends java.lang.Object

Class representing a Date value.


Constructor Summary
Date(int year, int month, int day)
          Create a Date object using the given year, month, day.
Date(long ms)
          Create a Date object using the milliseconds value (Number of milliseconds since 1 januari, 1970) ignoring the Time component.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares two Date objects
 int getDay()
          Returns the day
 int getMonth()
          Returns the month
 long getTime()
          Returns the Number of milliseconds since 1 januari, 1970.
 int getYear()
          Returns the year
 java.lang.String toString()
          Formats a date in the date escape format yyyy-mm-dd.
static Date valueOf(java.lang.String s)
          Create a Date object using a string having the yyyy-mm-dd format
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Date

public Date(int year,
            int month,
            int day)
Create a Date object using the given year, month, day. This date object is lenient, it accepts a wider range of field values than it produces.
Parameters:
year - the year value (absolute)
month - the month value (1-12)
day - the day value (absolute, starting with 1)

Date

public Date(long ms)
Create a Date object using the milliseconds value (Number of milliseconds since 1 januari, 1970) ignoring the Time component.
Parameters:
ms - Number of milliseconds since 1 januari, 1970
Method Detail

getYear

public int getYear()
Returns the year
Returns:
the year

getMonth

public int getMonth()
Returns the month
Returns:
the month

getDay

public int getDay()
Returns the day
Returns:
the day

valueOf

public static Date valueOf(java.lang.String s)
Create a Date object using a string having the yyyy-mm-dd format
Parameters:
s - date in yyyy-mm-dd format
Returns:
A new Date object
Throws:
java.lang.IllegalArgumentException - If String is invalid.

toString

public java.lang.String toString()
Formats a date in the date escape format yyyy-mm-dd.
Overrides:
toString in class java.lang.Object
Returns:
a String in yyyy-mm-dd format

getTime

public long getTime()
Returns the Number of milliseconds since 1 januari, 1970.
Returns:
Number of milliseconds since 1 januari, 1970

equals

public boolean equals(java.lang.Object obj)
Compares two Date objects
Overrides:
equals in class java.lang.Object
Parameters:
obj - the date object to compare with this object
Returns:
true if objects are equal, false if not

Java Client API Reference 6.0.2.61

Visit the SSA Global website for more information.