Package com.twilio.converter
Class DateConverter
- java.lang.Object
-
- com.twilio.converter.DateConverter
-
public class DateConverter extends Object
-
-
Constructor Summary
Constructors Constructor Description DateConverter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
dateStringFromLocalDate(org.joda.time.LocalDate date)
Format a @see org.joda.time.LocalDate.static org.joda.time.DateTime
iso8601DateTimeFromString(String dateTimeString)
Parse a @see org.joda.time.DateTime from a String.static org.joda.time.LocalDate
localDateFromString(String dateString)
Parse a @see org.joda.time.LocalDate from a String.static org.joda.time.DateTime
rfc2822DateTimeFromString(String dateTimeString)
Parse a @see org.joda.time.DateTime from a String.
-
-
-
Method Detail
-
rfc2822DateTimeFromString
public static org.joda.time.DateTime rfc2822DateTimeFromString(String dateTimeString)
Parse a @see org.joda.time.DateTime from a String.- Parameters:
dateTimeString
- timestamp to parse- Returns:
- parsed @see org.joda.time.DateTime if parseable, null otherwise
-
iso8601DateTimeFromString
public static org.joda.time.DateTime iso8601DateTimeFromString(String dateTimeString)
Parse a @see org.joda.time.DateTime from a String.- Parameters:
dateTimeString
- timestamp to parse- Returns:
- parsed @see org.joda.time.DateTime if parseable, null otherwise
-
localDateFromString
public static org.joda.time.LocalDate localDateFromString(String dateString)
Parse a @see org.joda.time.LocalDate from a String.- Parameters:
dateString
- the date String- Returns:
- parsed @see org.joda.time.LocalDate if parseable, null otherwise;
-
dateStringFromLocalDate
public static String dateStringFromLocalDate(org.joda.time.LocalDate date)
Format a @see org.joda.time.LocalDate.- Parameters:
date
- date to format- Returns:
- formatted date in YYYY-MM-DD
-
-