org.deegree.framework.util
Class TimeTools2
java.lang.Object
org.deegree.framework.util.TimeTools2
public class TimeTools2
- extends java.lang.Object
The TimeTools2
class can be used to format Strings to timecodes and get Calenadars of a given Timecode.
This variant can be used to properly handle time zones.
Andreas Poth
- Version:
- $Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18 Jun 2009) $
- Author:
- last edited by: $Author: mschneider $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TimeTools2
public TimeTools2()
getISOFormattedTime
public static java.lang.String getISOFormattedTime()
- Returns:
- the current timestamp in ISO format
getISOFormattedTime
public static java.lang.String getISOFormattedTime(java.util.Date date)
- returns the date calendar in ISO format
- Parameters:
date
-
- Returns:
- the date calendar in ISO format
getISOFormattedTime
public static java.lang.String getISOFormattedTime(java.util.Calendar cal)
- Parameters:
cal
- a Calendar to get the timevalues of
- Returns:
- the passed calendar in ISO format
createCalendar
public static java.util.Calendar createCalendar(java.lang.String isoDate)
throws java.lang.NumberFormatException
- Parameters:
isoDate
- an ISO timestamp-> year-mon-dayThours:min:sec
- Returns:
- an instance of a
GregorianCalendar from an ISO timestamp
- Throws:
java.lang.NumberFormatException
- if the parsted values of the given String are no proper numbers.
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org