public class RFC3339Utils extends Object
DateTime
and to RFC3339 compatible StringsModifier and Type | Field and Description |
---|---|
static org.joda.time.format.DateTimeFormatter |
LOCAL_STANDARD_FMT |
static org.joda.time.format.DateTimeFormatter |
LOCAL_SUB_SECOND_FMT |
static org.joda.time.format.DateTimeFormatter |
UTC_STANDARD_FMT |
static org.joda.time.format.DateTimeFormatter |
UTC_SUB_SECOND_FMT |
Modifier and Type | Method and Description |
---|---|
static String |
format(org.joda.time.DateTime toFormat) |
static String |
format(org.joda.time.DateTime toFormat,
TimeZone tz) |
static String |
format(String dateString)
Formats an arbitrarily formatted into RFC3339 Specifications.
|
static RFC3339Utils |
getInstance() |
static org.joda.time.DateTime |
parseToUTC(String dateString)
Parses arbitrarily formatted Strings representing dates or dates and times to a
DateTime
objects. |
static org.joda.time.DateTime |
parseUTC(String toParse)
parse String to DateTime
|
public static final org.joda.time.format.DateTimeFormatter UTC_STANDARD_FMT
public static final org.joda.time.format.DateTimeFormatter UTC_SUB_SECOND_FMT
public static final org.joda.time.format.DateTimeFormatter LOCAL_STANDARD_FMT
public static final org.joda.time.format.DateTimeFormatter LOCAL_SUB_SECOND_FMT
public static RFC3339Utils getInstance()
public static org.joda.time.DateTime parseUTC(String toParse)
toParse
- DateTime as UTC Stringpublic static org.joda.time.DateTime parseToUTC(String dateString)
DateTime
objects. It first attempts parse with international standards, assuming the dates are either dd MM yyyy or
yyyy MM dd. If that fails it will try American formats where the month precedes the days of the month.dateString
- abitrarily formatted date or date and time stringDateTime
representation of the dateStringpublic static String format(String dateString)
dateString
- date string to be formattedpublic static String format(org.joda.time.DateTime toFormat)
Copyright © 2018 The Apache Software Foundation. All rights reserved.