JodaFormatter¶
-
public class
JodaFormatter
¶ Class responsible for parsing and formatting several classes from
org.joda.time
package.
Methods¶
formatDateTime¶
formatPeriod¶
parse¶
-
public Period
parse
(String intervalString, Locale locale)¶ Parses time interval in different units, eg: “1 year”
Parameters: - intervalString – time interval format number: integer unit : year, month, week, day, hour, minute, second (can use plural forms also) currently compound units like 1 year and 2 months are not supported
- locale – the locale to be used when parsing given
String
Returns: the given
String
parsed toimport org.joda.time.Period
parseDateTime¶
parsePeriod¶
-
public Period
parsePeriod
(String intervalString)¶ Parses time interval in different units, eg: “1 year”
Parameters: - intervalString – time interval format number: integer unit : year, month, week, day, hour, minute, second (can use plural forms also) currently compound units like 1 year and 2 months are not supported
Returns: the given
String
parsed toimport org.joda.time.Period