|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.ml.om.util.DateConverter
public class DateConverter
The DateConverter is a helper class that provides methods for handling
the all kind of date formats.
E.g. the ISO8601 date format (A short summary about the ISO8601 date format
can be accessed at the W3C.), or the Julian
date.
| Constructor Summary | |
|---|---|
DateConverter()
|
|
| Method Summary | |
|---|---|
static java.util.Calendar |
toDate(java.lang.String iso8601)
Converts a String object that contains a ISO8601 conform value to an java.util.Calendar object. |
static java.util.Calendar |
toGregorianDate(double julianDate)
Converts a julian date into a gregorian date. |
static java.util.Calendar |
toGregorianDate(double julianDate,
java.util.TimeZone zone)
Converts a julian date into a gregorian date. |
static java.lang.String |
toISO8601(java.util.Calendar calendar)
Converts a Date object into a String object that represents a ISO8601 conform string. |
static double |
toJulianDate(java.util.Calendar gregorianCalendar)
Converts a gregorian date into a julian date. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DateConverter()
| Method Detail |
|---|
public static double toJulianDate(java.util.Calendar gregorianCalendar)
gregorianCalendar - The gregorianDate date
java.lang.IllegalArgumentException - DOCUMENT ME!public static java.util.Calendar toGregorianDate(double julianDate)
julianDate - The julian date
public static java.util.Calendar toGregorianDate(double julianDate,
java.util.TimeZone zone)
julianDate - The julian datezone - The timzone for the returned gregorian date (if
NULL is passed GMT will be taken)
java.lang.IllegalArgumentException - DOCUMENT ME!public static java.lang.String toISO8601(java.util.Calendar calendar)
calendar - A java.util.Date object that has to be converted
null if the given date
was null
public static java.util.Calendar toDate(java.lang.String iso8601)
throws java.lang.NumberFormatException
iso8601 - A String with a ISO8601 conform value
null
if the given string was null or empty.
java.lang.NumberFormatException - if given ISO8601 is malformed.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||