Class DateParseHelper
- java.lang.Object
-
- hu.icellmobilsoft.coffee.tool.utils.date.DateParseHelper
-
public class DateParseHelper extends Object
Helper osztály, java 8 time-ok parsolásához- Since:
- 1.0.0
- Author:
- mark.petrenyi
-
-
Constructor Summary
Constructors Constructor Description DateParseHelper()Default constructor, constructs a new object.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static LocalDateparseLocalDateEx(String from)Unmarshalling object toLocalDatestatic OffsetDateTimeparseOffsetDateTimeEx(String from)String toOffsetDateTimestatic OffsetTimeparseOffsetTimeEx(String from)String toOffsetTime
-
-
-
Method Detail
-
parseOffsetDateTimeEx
public static OffsetDateTime parseOffsetDateTimeEx(String from) throws hu.icellmobilsoft.coffee.dto.exception.BaseException
String toOffsetDateTime- 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 toOffsetTime- 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 toLocalDate- 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
-
-