com.cumulocity.model
Class DateConverter
java.lang.Object
com.cumulocity.model.DateConverter
- All Implemented Interfaces:
- org.svenson.converter.TypeConverter
public class DateConverter
- extends Object
- implements org.svenson.converter.TypeConverter
Provides methods to convert Date to/from String, so that it can be used as JSON object where required.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DateConverter
public DateConverter()
fromJSON
public Object fromJSON(Object in)
- Specified by:
fromJSON
in interface org.svenson.converter.TypeConverter
string2Date
public static Date string2Date(String in)
- Convert a String into a date using
ISODateTimeFormat
;
- Parameters:
in
-
- Returns:
toJSON
public Object toJSON(Object in)
- Specified by:
toJSON
in interface org.svenson.converter.TypeConverter
date2String
public static String date2String(Date in)
- Return a String representation of the given Date.
- Parameters:
in
-
- Returns:
Copyright © 2013 (C) Cumulocity GmbH. All Rights Reserved.