|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.ic.doc.automed.util.DateUtil
public class DateUtil
Method Summary | |
---|---|
static java.lang.String |
getBriefDateString()
Return a brief date string of current date Example: 20/7/2006 1:1:1---> 20060720 |
static java.lang.String |
getClockRepresentation(java.util.Date dateObj)
Return a standard clock representation of a Date object |
static java.lang.String |
getClockRepresentation(long numMilliSecs)
Return a standard clock representation from the number of millisecs |
static java.lang.String |
getClockRepresentation(long[] timeElements)
Return a standard clock representation of a time value. |
static java.lang.String |
getDate()
Return the current date/time in a standard format |
static java.util.Date |
getDate(long millisecs)
Return a date from number of its milli-seconds |
static long |
getDateAsMillisecs()
Return the current date as the number of milli-seconds |
static java.lang.String |
getDateString()
Return a date string of current date Example: 20/7/2006 1:1:1---> 20060720_010101 |
static long |
getMilliseconds(java.util.Date dateObj)
Convert a Date object into the number of milliseconds from start of the clock |
static void |
main(java.lang.String[] args)
|
static long[] |
subtractDate(java.util.Date date1,
java.util.Date date2)
Subtract Date 1 from Date 2 to return the result as
an array of numbers of hours, minutes, and seconds |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static long[] subtractDate(java.util.Date date1, java.util.Date date2)
Date
1 from Date
2 to return the result as
an array of numbers of hours, minutes, and seconds
date1
- Date
object to be subtracteddate2
- Date
object to be subtracted from (i.e. date2 - date1)
long
[] a long-type array of hours, minutes and secondspublic static java.lang.String getDate()
String
- date/time stringpublic static long getDateAsMillisecs()
public static java.util.Date getDate(long millisecs)
public static java.lang.String getDateString()
public static java.lang.String getBriefDateString()
public static long getMilliseconds(java.util.Date dateObj)
Date
object into the number of milliseconds from start of the clock
public static java.lang.String getClockRepresentation(long numMilliSecs)
public static java.lang.String getClockRepresentation(java.util.Date dateObj)
public static java.lang.String getClockRepresentation(long[] timeElements)
{@link
- long}[] an array of time elements, typically the number of hours, public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |