|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.alarexgroup.m2mplf.util.DateTime
public class DateTime
Object for work with time. Combines properties of standard JAVAs classes Calendar and Date.
Allows get current time and transform form of Date, long (miliseconds) and DDMMRRRRhhmmssms
Objects is also possible to compare and change single parameters as houer, minutes...
| Constructor Summary | |
|---|---|
DateTime()
Returns object DateTime - includes current date and time |
|
DateTime(java.util.Date d)
Returns object DateTime - date and time set according to the type Date content. |
|
DateTime(int day,
int month,
int year,
int hour,
int min,
int sec,
int ms)
Returns object DateTime - date and time according to single parametrs |
|
DateTime(long time)
Returns object Datetime which includes date and time according to long type content (miliseconds) |
|
| Method Summary | |
|---|---|
boolean |
after(DateTime d)
Compares if object's date in parametr was before date |
boolean |
before(DateTime d)
Compares if object's date in parametr was after date |
boolean |
equals(DateTime d)
Detects if the dates were the same |
int |
getDay()
Returns Day |
static long |
getDelta()
|
int |
getHour()
Returns hour in 0..23 form |
int |
getMillisecond()
Returns miliseconds |
int |
getMinute()
Returns minute |
int |
getMonth()
Returns month |
static long |
getRealTimeInMilis()
|
int |
getSecond()
Returns seconds |
int |
getYear()
Returns year |
void |
setDay(int day)
Sets day |
void |
setHour(int hour)
Sets hour |
void |
setMilliSecond(int ms)
Sets milisecond |
void |
setMinute(int min)
Sets Minute |
void |
setMonth(int month)
Sets month |
static void |
setRealDateTime(int day,
int month,
int year,
int hour,
int minute,
int second,
int milisecond)
Nastaví skutečné datum a čas pro třídu DateTime |
void |
setSecond(int sec)
Sets Second |
void |
setYear(int year)
Sets year |
java.util.Date |
toDate()
Convert DateTime into Date form |
long |
toLong()
Convert DateTime into long type form - miliseconds |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DateTime(java.util.Date d)
d - Date and time in Date formpublic DateTime()
public DateTime(long time)
l - time and date - miliseconds
public DateTime(int day,
int month,
int year,
int hour,
int min,
int sec,
int ms)
day - 1..31month - 1..12year - 200xhour - 0..23min - 0..59sec - 0..59ms - 0..999| Method Detail |
|---|
public static void setRealDateTime(int day,
int month,
int year,
int hour,
int minute,
int second,
int milisecond)
public static long getDelta()
public static long getRealTimeInMilis()
public long toLong()
public java.util.Date toDate()
public int getDay()
public int getMonth()
public int getYear()
public int getHour()
public int getMinute()
public int getSecond()
public int getMillisecond()
public boolean after(DateTime d)
d - compared date
public boolean before(DateTime d)
d - compared date
public boolean equals(DateTime d)
d - compared date
public void setHour(int hour)
hour - public void setMinute(int min)
Minute - public void setSecond(int sec)
sec - public void setMilliSecond(int ms)
ms - public void setDay(int day)
day - public void setMonth(int month)
month - public void setYear(int year)
year -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||