Java Client API Reference 6.0.2.61

com.ssaglobal.bde
Class DateTime

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

public class DateTime
extends java.lang.Object

Class representing a DateTime value.


Constructor Summary
DateTime(int year, int month, int day, int hour, int minute, int second)
          Create a new DateTime instance This date object is lenient, it accepts a wider range of field values than it produces.
DateTime(long ms)
          Creates a DateTime object using the Number of milliseconds since 1 januari, 1970
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares two DateTime Objects
 int getDay()
          Returns the day
 int getHour()
          Returns the hour
 int getMinute()
          Returns the minute
 int getMonth()
          Returns the month
 int getSecond()
          Returns the second
 long getTime()
          Returns the milliseconds since 1 januari, 1970, of this DateTiem object
 int getYear()
          Returns the year
 java.lang.String toString()
          Returns a string representing this DateTime value (ISO 8601)
static DateTime valueOf(java.lang.String s)
          Creates a DateTime object out of a string (ISO 8601)
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DateTime

public DateTime(int year,
                int month,
                int day,
                int hour,
                int minute,
                int second)
Create a new DateTime instance 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)
hour - the hour
minute - the minute
second - the second

DateTime

public DateTime(long ms)
Creates a DateTime object using the Number of milliseconds since 1 januari, 1970
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

getHour

public int getHour()
Returns the hour
Returns:
the hour

getMinute

public int getMinute()
Returns the minute
Returns:
minute

getSecond

public int getSecond()
Returns the second
Returns:
second

getTime

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

valueOf

public static DateTime valueOf(java.lang.String s)
Creates a DateTime object out of a string (ISO 8601)
Parameters:
s - the DateTime value in string format (ISO 8601)
Returns:
the new Datetime Object,
Throws:
java.lang.IllegalArgumentException - If String is invalid.*

toString

public java.lang.String toString()
Returns a string representing this DateTime value (ISO 8601)
Overrides:
toString in class java.lang.Object
Returns:
The DateTime value in string format (ISO 8601)

equals

public boolean equals(java.lang.Object obj)
Compares two DateTime Objects
Overrides:
equals in class java.lang.Object
Parameters:
obj - the DateTime object to compare
Returns:
True if equal, false if not

Java Client API Reference 6.0.2.61

Visit the SSA Global website for more information.