Class DateConverter


  • public class DateConverter
    extends Object
    • Constructor Detail

      • DateConverter

        public DateConverter()
    • 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