Class DateTimeUtils

    • Method Detail

      • convertDateTimeStringToDate

        public static Date convertDateTimeStringToDate​(String value)
        Converts a date time string to local date time. Note: this method also allows dates without times, in which case the time will be 00:00:00 in the supplied timezone. UTC timezone will be assumed if no timezone is supplied.
        Parameters:
        value - The string value to parse.
        Returns:
        The parsed Date.
        Throws:
        IllegalArgumentException - If string can not be parsed.
      • convertDateStringToDate

        public static Date convertDateStringToDate​(String value)
        Converts a date string to local date time. UTC timezone will be assumed if no timezone is supplied.
        Parameters:
        value - The string value to parse.
        Returns:
        The parsed Date.
        Throws:
        IllegalArgumentException - If string can not be parsed.