An extremely fast parser and formatter of standardized date and date-times supporting RFC-3339 (ISO-8601 profile) and more.
APACHE-2.0 License
Bot releases are visible (Hide)
Fixes issue #31 - A single trailing character after end of date-time was parsed was not raised as an error. Thanks a lot to @justin-tay for reporting it!
Published by ethlo 8 months ago
Fix OSGI build to include ITU v1.10.0 custom parsers
Published by ethlo 9 months ago
New features
DateTimeParsers.of(...)
builder. See sample section for more information.Published by ethlo 9 months ago
parseDateTime(...)
with java.text.ParsePosition
. This avoids the need to use substring for passing in the date-time string.ParseConfig
which allows the configuration of the date/time separator (typically T
) and the fragment separator (typically .
).Published by ethlo 9 months ago
New features
Parsing will now throw an DateTimeParseException
instead of the parent DateTimeException
. This gives access to the index of the error if any.
Bug-fixes
ArrayIndexOutOfBoundsException
would be thrown in case of a specific, erroneous date-time string.NullPointerException
due to the missing ZoneOffset.Remediation
There has now been added additional tests and even intelligent fuzzer tests through the use of Jazzer.
Published by ethlo 9 months ago
com.ethlo.time.DateTime
now supports toInstant()
with a best-effort approach, so it will parse according to RFC-3339, but it will not raise an error for missing granularity nor timezone information.
Published by ethlo 10 months ago
com.ethlo.time.DateTime
now implements java.time.temporal.TemporalAccessor
Published by ethlo 10 months ago
<classifier>small</classifier>
to use it.OffsetDateTime
now emit error messages closer to parsing via java.time
.Published by ethlo 10 months ago
Parser performance and GC improvements.
JMH tests indicate about 40% faster parsing.
Published by ethlo over 1 year ago
Added OSGI support - thanks to @marcoSpoethAtYatta
Published by ethlo over 1 year ago
Just added the license to the pom.xml
.
Published by ethlo over 1 year ago
Fix #11
Published by ethlo over 2 years ago
Published by ethlo over 2 years ago
New helper methods were added to deal with different granularity.
Validate to different required granularity:
ITU.isValid("2017-12-06", TemporalType.LOCAL_DATE_TIME);
Allowing handling different levels of granularity:
return ITU.parse("2017-12-06", new TemporalHandler<>()
{
@Override
public OffsetDateTime handle(final LocalDate localDate)
{
return localDate.atTime(OffsetTime.of(LocalTime.of(0, 0), ZoneOffset.UTC));
}
@Override
public OffsetDateTime handle(final OffsetDateTime offsetDateTime)
{
return offsetDateTime;
}
});
Published by ethlo over 2 years ago
ITU.parseLenient(String)
now returns a custom DateTime object, which can be transformed to OffsetDateTime, LocalDateTime, etc, depending on how granular the fields in the input.java.util.Date
.Published by ethlo over 2 years ago
Published by ethlo over 2 years ago
ITU is now using a list of known leap-second dates in the past and keeps the current rule for date-times after the last known leap-second year/date. This will avoid breaking the parsing of valid leap second due to not having the very last updated list of leap-seconds. The LeapSecondException
now has a new method to allow for checking if this is indeed a valid leap-second according to the list, via boolean isVerifiedValidLeapYearMonth()
.
Published by ethlo over 2 years ago
java.time
classesPublished by ethlo over 2 years ago
Published by ethlo almost 4 years ago
Support parsing of sub-date formats (year and year-month) and ITU utility class with static methods