|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jutil.TTime
public final class TTime
This is the TTime utility code class.
| Field Summary | |
|---|---|
static long |
DAY
Const time value HOUR_24 = 86,400,000ms = 24 hr USAGE: long timeToWait = org.jutil.TTime.HOUR_24; |
static long |
HOUR_1
Const time value HOUR_1 = 3,600,000ms = 1 hr USAGE: long timeToWait = org.jutil.TTime.HOUR_1; |
static long |
HOUR_12
Const time value HOUR_12 = 43,200,000ms = 12 hr USAGE: long timeToWait = org.jutil.TTime.HOUR_12; |
static long |
HOUR_24
Const time value HOUR_24 = 86,400,000ms = 24 hr USAGE: long timeToWait = org.jutil.TTime.HOUR_24; |
static long |
MIN_1
Const time value MIN_1 = 60,000ms = 1 min USAGE: long timeToWait = org.jutil.TTime.MIN_1; |
static long |
MIN_10
Const time value MIN_10 = 600,000ms = 10 min USAGE: long timeToWait = org.jutil.TTime.MIN_10; |
static long |
MIN_30
Const time value MIN_30 = 1,800,000ms = 30 min USAGE: long timeToWait = org.jutil.TTime.MIN_30; |
static long |
MIN_5
Const time value MIN_5 = 300,000ms = 5 min USAGE: long timeToWait = org.jutil.TTime.MIN_5; |
static long |
SEC_1
Const time value SEC_1 = 1,000ms = 1 sec USAGE: long timeToWait = org.jutil.TTime.SEC_1; |
static long |
SEC_10
Const time value SEC_10 = 10,000ms = 10 sec USAGE: long timeToWait = org.jutil.TTime.SEC_10; |
static long |
SEC_30
Const time value SEC_30 = 30,000ms = 30 sec USAGE: long timeToWait = org.jutil.TTime.SEC_30; |
static long |
SEC_5
Const time value SEC_5 = 5,000ms = 5 sec USAGE: long timeToWait = org.jutil.TTime.SEC_5; |
static long |
WEEK
Const time value WEEK = 604,800,000ms = 1 week USAGE: long timeToWait = org.jutil.TTime.WEEK; |
| Constructor Summary | |
|---|---|
TTime()
Ensure that no one can create instances of this Class. |
|
| Method Summary | |
|---|---|
static java.sql.Time |
create(int year,
int month,
int day,
int hrs,
int min)
|
static java.sql.Time |
create(int year,
int month,
int day,
int hrs,
int min,
int sec)
|
static java.sql.Time |
create(java.lang.String s)
create from a string in JDBC Timestamp escape format to a Time value usage: TTime.create("1999-02-02 08:30:00.0"); |
static java.lang.String |
formatTimeElaspsedToString(long time)
|
static long |
getAccurateTime(java.sql.Timestamp timestamp)
USAGE: org.jutil.TTime.getAccurateTime( Timestamp timestamp ); |
static long |
getTime()
USAGE: org.jutil.TTime.getTime(); |
static long |
getUniqueTime()
USAGE: org.jutil.TTime.getUniqueTime(); |
static boolean |
isTimestampInRange(java.sql.Timestamp test,
java.sql.Timestamp start,
java.sql.Timestamp end)
USAGE: org.jutil.TTime.isTimestampInRange( Timestamp test, Timestamp start, Timestamp end ); |
static void |
main(java.lang.String[] args)
|
static java.util.Calendar |
parseISO8061DateTimeString(java.lang.String value)
parse format expected "yyyy-MM-dd'T'HH:mm:ss" "yyyy-MM-ddTHH:mm:ss" => 2007-04-03T20:56:13 "yyyy-MM-ddTHH:mm:ss:zz" => 2007-04-03T20:56:13:GMT+10:00 |
static void |
tick(long ms)
USAGE: org.jutil.TTime.tick(long ms) |
static long |
timeElaspsed(long time)
USAGE: org.jutil.TTime.timeElaspsed(long time); long timeStarted = getTime(); { // do some operation code here ... |
static java.lang.String |
timeElaspsedToString(long time)
USAGE: org.jutil.TTime.timeElaspsed(long time); long timeStarted = getTime(); { // do some operation code here ... |
static java.lang.String |
toGMTString(long time)
USAGE: org.jutil.TTime.toGMTString(long time); formats long time to cookie GMT String Wed, 01 Jan 2020 12:00:00 GMT |
static java.lang.String |
toISO8061DateTimeString(java.util.Calendar cal,
boolean incTimeZone)
|
static java.lang.String |
toISO8061DateTimeString(java.util.Date date,
boolean incTimeZone)
|
static java.lang.String |
toISO8061DateTimeString(long time)
USAGE: org.jutil.TTime.toISO8061DateTimeString(long time); formats long time to to ISO8061 DateTime String "yyyy-MM-ddTHH:mm:ss" => 2007-04-03T20:56:13 |
static java.lang.String |
toISO8061DateTimeString(long time,
boolean incTimeZone)
damm this should be ISO8601 USAGE: org.jutil.TTime.toISO8061DateTimeString(long time, boolean incTimeZone); formats long time to to ISO8061 DateTime String with timezone #NOTE Time zone portion has NOT been tested "yyyy-MM-ddTHH:mm:ss" => 2007-04-03T20:56:13 "yyyy-MM-ddTHH:mm:ss:zz" => 2007-04-03T20:56:13:GMT+10:00 |
static java.lang.String |
toSecString(long time)
USAGE: org.jutil.TTime.toSecString(long time); |
static java.lang.String |
toSimpleDateFormat(long time,
java.lang.String format)
USAGE: org.jutil.TTime.toSimpleDateFormat(long time, final String format); org.jutil.TTime.toSimpleDateFormat(time, "dd MM yyyy"); |
static java.lang.String |
toSimpleString(long time)
USAGE: org.jutil.TTime.toSimpleString(long time); |
static java.lang.String |
toString(long time)
USAGE: org.jutil.TTime.toString(long time); |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long SEC_1
public static final long SEC_5
public static final long SEC_10
public static final long SEC_30
public static final long MIN_1
public static final long MIN_5
public static final long MIN_10
public static final long MIN_30
public static final long HOUR_1
public static final long HOUR_12
public static final long HOUR_24
public static final long DAY
public static final long WEEK
| Constructor Detail |
|---|
public TTime()
| Method Detail |
|---|
public static java.sql.Time create(java.lang.String s)
s - time in format "yyyy-mm-dd hh:mm:ss.fffffffff"
public static java.sql.Time create(int year,
int month,
int day,
int hrs,
int min)
public static java.sql.Time create(int year,
int month,
int day,
int hrs,
int min,
int sec)
public static final long getTime()
public static final long getUniqueTime()
public static final void tick(long ms)
ms - public static final java.lang.String timeElaspsedToString(long time)
public static final java.lang.String formatTimeElaspsedToString(long time)
public static final long timeElaspsed(long time)
public static final java.lang.String toSimpleDateFormat(long time,
java.lang.String format)
public static final java.lang.String toSimpleString(long time)
public static void main(java.lang.String[] args)
public static final java.lang.String toGMTString(long time)
public static final java.lang.String toISO8061DateTimeString(long time)
public static final java.lang.String toISO8061DateTimeString(long time,
boolean incTimeZone)
public static final java.lang.String toISO8061DateTimeString(java.util.Calendar cal,
boolean incTimeZone)
public static final java.lang.String toISO8061DateTimeString(java.util.Date date,
boolean incTimeZone)
public static final java.util.Calendar parseISO8061DateTimeString(java.lang.String value)
throws java.lang.IndexOutOfBoundsException,
java.lang.IllegalArgumentException
java.lang.IndexOutOfBoundsException
java.lang.IllegalArgumentExceptionpublic static final java.lang.String toString(long time)
public static final java.lang.String toSecString(long time)
public static final long getAccurateTime(java.sql.Timestamp timestamp)
public static final boolean isTimestampInRange(java.sql.Timestamp test,
java.sql.Timestamp start,
java.sql.Timestamp end)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||