Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
cwensel committed Nov 8, 2023
1 parent a31a0c3 commit 496d4e0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ WIP release maven coordinates can be found at:

* https://github.com/orgs/Heretical/packages?repo_name=mini-parsers

This library requires Java 8 and the parsing functionality is dependent on [Parboiled](https://github.com/sirthias/parboiled/wiki).
This library requires Java 11 and the parsing functionality is dependent on [Parboiled](https://github.com/sirthias/parboiled/wiki).

## Usage

Expand Down Expand Up @@ -147,11 +147,13 @@ Context context = new Context();

RelativeDateTimeAdjusterParser parser = new RelativeDateTimeAdjusterParser( context );

java.time.Instant hourAgo = parser.parseOrFail( "-60m" ).getResult();
java.time.Instant hourAgo = parser.parseOrFail( "60m" ).getResult();

java.time.Instant hourAgoOnTheHour = parser.parseOrFail( "-1h@h" ).getResult();
java.time.Instant alsoHourAgo = parser.parseOrFail( "-60m" ).getResult();

java.time.Instant weekAgoToday = parser.parseOrFail( "-7d@d" ).getResult();
java.time.Instant hourAgoOnTheHour = parser.parseOrFail( "1h@h" ).getResult();

java.time.Instant weekAgoToday = parser.parseOrFail( "7d@d" ).getResult();

java.time.Instant beginningOfCurrentWeek = parser.parseOrFail( "@w0" ).getResult(); // depends on locale

Expand Down

0 comments on commit 496d4e0

Please sign in to comment.