Class DateParseHelper


  • public class DateParseHelper
    extends Object
    Helper osztály, java 8 time-ok parsolásához
    Since:
    1.0.0
    Author:
    mark.petrenyi
    • Constructor Detail

      • DateParseHelper

        public DateParseHelper()
        Default constructor, constructs a new object.
    • Method Detail

      • parseOffsetDateTimeEx

        public static OffsetDateTime parseOffsetDateTimeEx​(String from)
                                                    throws hu.icellmobilsoft.coffee.dto.exception.BaseException
        String to OffsetDateTime
        Parameters:
        from - Parse string as OffsetDateTime. Valid values are UTC time in millis; and ISO_OFFSET_DATE_TIME or ISO_LOCAL_DATE_TIME ('2011-12-03T10:15:30+01:00' or '2011-12-03T10:15:30') representation of date
        Returns:
        UTC offset if input is time in millis, or ISO_LOCAL_DATE_TIME String, specified offset otherwise
        Throws:
        hu.icellmobilsoft.coffee.dto.exception.BaseException - if input parameter is unparsable
      • parseOffsetTimeEx

        public static OffsetTime parseOffsetTimeEx​(String from)
                                            throws hu.icellmobilsoft.coffee.dto.exception.BaseException
        String to OffsetTime
        Parameters:
        from - Parse string as OffsetTime. Valid values are ISO_OFFSET__TIME or ISO_LOCAL__TIME ('10:15:30+01:00' or '10:15:30') representation of date
        Returns:
        UTC offset if input is ISO_LOCAL_TIME String, specified offset otherwise
        Throws:
        hu.icellmobilsoft.coffee.dto.exception.BaseException - if input parameter is unparsable
      • parseLocalDateEx

        public static LocalDate parseLocalDateEx​(String from)
                                          throws hu.icellmobilsoft.coffee.dto.exception.BaseException
        Unmarshalling object to LocalDate
        Parameters:
        from - Parse string as LocalDate. Valid values are UTC time in millis; and ISO_DATE ('2011-12-03' or '2011-12-03+01:00') representation of date
        Returns:
        parsed LocalDate
        Throws:
        hu.icellmobilsoft.coffee.dto.exception.BaseException - if input parameter is unparsable