|
deegree 2.6-pre (2011/11/29 00:10 build-378-unofficial) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree.framework.util.TimeTools
public class TimeTools
The TimeTools
class can be used to format Strings to timecodes and get Calenadars of a given Timecode.
Andreas Poth
Field Summary | |
---|---|
static int |
DAY
A final Day representation |
static int |
HOUR
A final Hour representation |
static int |
MILLISECOND
A final MilliSecond representation |
static int |
MINUTE
A final Minute representation |
static int |
MONTH
A final Month representation |
static int |
SECOND
A final Second representation |
static int |
YEAR
A final Year representation |
Constructor Summary | |
---|---|
TimeTools()
|
Method Summary | |
---|---|
static GregorianCalendar |
createCalendar(String isoDate)
Notice that a Calendar does not consider milli seconds. |
static Date |
createDate(String isoDate)
|
static String |
getISOFormattedTime()
|
static String |
getISOFormattedTime(Calendar cal)
|
static String |
getISOFormattedTime(Date date)
returns the date calendar in ISO format |
static String |
getISOFormattedTime(Date date,
Locale locale)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int YEAR
public static final int MONTH
public static final int DAY
public static final int HOUR
public static final int MINUTE
public static final int SECOND
public static final int MILLISECOND
Constructor Detail |
---|
public TimeTools()
Method Detail |
---|
public static String getISOFormattedTime()
public static String getISOFormattedTime(Date date)
date
-
public static String getISOFormattedTime(Date date, Locale locale)
date
- the date object to get the time values oflocale
- the locale to convert to
public static String getISOFormattedTime(Calendar cal)
cal
- a Calendar to get the timevalues of
public static GregorianCalendar createCalendar(String isoDate) throws NumberFormatException
isoDate
- an ISO timestamp-> year-mon-dayThours:min:sec
GregorianCalendar from an ISO timestamp
- Throws:
NumberFormatException
- if the parsted values of the given String are no proper numbers.
public static Date createDate(String isoDate)
isoDate
- an ISO timestamp-> year-mon-dayThours:min:sec.millis
java.util.Date from an ISO timestamp
- Throws:
NumberFormatException
- if the parsted values of the given String are no proper numbers.
|
deegree 2.6-pre (2011/11/29 00:10 build-378-unofficial) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org