Skip to content

Commit

Permalink
Resolve conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
Morten Haraldsen committed Jan 23, 2024
2 parents 2c358c1 + 10a8d67 commit 9669d7e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ class Test {
}
```
#### Parsing leniently to a timestamp
In some real world scenarios, the need to parse a best-effort timestamp is needed. To ease this, we can use `ITU.parseLenient()` with `DateTime.toInstant()` like this:
In some real world scenarios, it is useful to parse a best-effort timestamp. To ease usage, converting a raw `com.ethlo.time.DateTime` instance into `java.time.Instant` was added in 1.7.7.

We can use `ITU.parseLenient()` with `DateTime.toInstant()` like this:

```java
import com.ethlo.time.ITU;
Expand Down Expand Up @@ -231,9 +233,20 @@ instead of `60`.

## Changelog

### Version 1.7.7
2024-01-22

`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.

### Version 1.7.6
2024-01-05

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

### Version 1.7.5

2023-12-28

* 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`.
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/ethlo/time/internal/EthloITU.java
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,10 @@ private static Object handleTime(int year, int month, int day, int hour, int min
if (remaining == 2)
{
final int seconds = parsePositiveInt(chars, 17, 19);
<<<<<<< HEAD
=======
leapSecondCheck(year, month, day, hour, minute, 0, 0, null);
>>>>>>> main
if (raw)
{
return new DateTime(Field.SECOND, year, month, day, hour, minute, seconds, 0, null, 0);
Expand Down

0 comments on commit 9669d7e

Please sign in to comment.