itu

An extremely fast parser and formatter of standardized date and date-times supporting RFC-3339 (ISO-8601 profile) and more.

APACHE-2.0 License

Stars
25

Bot releases are visible (Hide)

itu - v1.10.2 Latest Release

Published by ethlo 6 months ago

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!

itu - v1.10.1

Published by ethlo 8 months ago

Fix OSGI build to include ITU v1.10.0 custom parsers

itu - v1.10.0

Published by ethlo 9 months ago

New features

  • Support for parsing non-standard formats using DateTimeParsers.of(...) builder. See sample section for more information.
  • Even more specific error messages when parsing.
itu - v1.9.0

Published by ethlo 9 months ago

New features

  • Support for parseDateTime(...) with java.text.ParsePosition. This avoids the need to use substring for passing in the date-time string.
  • Support for parsing leniently with ParseConfig which allows the configuration of the date/time separator (typically T) and the fragment separator (typically .).
  • More expressive and better aligned error messages.
itu - v1.8.0

Published by ethlo 9 months ago

New features
Parsing will now throw an DateTimeParseExceptioninstead of the parent DateTimeException. This gives access to the index of the error if any.

Bug-fixes

  • An ArrayIndexOutOfBoundsException would be thrown in case of a specific, erroneous date-time string.
  • Parsing a date-time with a leap-second, but without time-offset would throw a NullPointerException due to the missing ZoneOffset.

Remediation
There has now been added additional tests and even intelligent fuzzer tests through the use of Jazzer.

itu - v1.7.7

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.

itu - 1.7.6

Published by ethlo 10 months ago

com.ethlo.time.DateTime now implements java.time.temporal.TemporalAccessor

itu - v1.7.5

Published by ethlo 10 months ago

  • Releasing a minified version for scenarios where every KB counts. Use <classifier>small</classifier> to use it.
  • Even faster parsing performance. 1.7.5 is more than twice as fast as 1.7.0.
  • NOTE: Parsing to OffsetDateTime now emit error messages closer to parsing via java.time.
itu - 1.7.4

Published by ethlo 10 months ago

Parser performance and GC improvements.
JMH tests indicate about 40% faster parsing.

itu - v1.7.3

Published by ethlo over 1 year ago

Added OSGI support - thanks to @marcoSpoethAtYatta

itu - v1.7.2

Published by ethlo over 1 year ago

Just added the license to the pom.xml.

itu - v1.7.1

Published by ethlo over 1 year ago

Fix #11

itu - v1.7.0

Published by ethlo over 2 years ago

  • Added support for keeping the number of significant fraction digits in the second.
  • Added toString methods to DateTime for formatting.
  • Added support for formatting date-times with other time-offsets than UTC.
  • Vastly improved JavaDoc.
itu - v1.6.1

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;
    }
});
itu - v1.6.0

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.
  • Removed methods supporting the handling of java.util.Date.
itu - v1.5.2

Published by ethlo over 2 years ago

  • Performance optimizations, especially formatting performance nearly doubled.
  • Better error message for date-times with fractions, but missing time-zone.
  • More granular benchmark tests.
itu - v1.5.1

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().

itu - v1.5.0

Published by ethlo over 2 years ago

  • Massive performance improvement for formatting
  • NOTE: Breaking change where previous versions returned null for null/empty input when parsing. This now throws an exception in line with the java.time classes
itu - v1.4.0

Published by ethlo over 2 years ago

  • Upgrade test dependencies and restructure a few internals to be able to write more fine-grained tests
  • Rerun tests for performance documentation.
itu - v1.2.0

Published by ethlo almost 4 years ago

Support parsing of sub-date formats (year and year-month) and ITU utility class with static methods