Skip to content

Commit

Permalink
docs: better documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
matiwinnetou authored Nov 27, 2023
1 parent 4d02ea0 commit 27b347c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ implementation("org.cardanofoundation:cf-cardano-conversions-java:1.0.0")
```java
var converters = ClasspathConversionsFactory.createConverters(NetworkType.MAINNET);

var epochStartTime = converters.epoch().epochToUTCTime(445, EpochOffset.START);
var lastAlonzoAbsoluteSlot = converters.epoch().epochToAbsoluteSlot(364, EpochOffset.END);
var epochStartTime = converters.epoch().beginningOfEpochToUTCTime(445);
var utcTime = converters.slot().slotToTime(109090938L);
var epochNo = converters.time().utcTimeToEpochNo(LocalDateTime.of(2023, 11, 22, 9, 48, 58));
var lastAlonzoAbsoluteSlot = converters.epoch().endingOfEpochToAbsoluteSlot(364);

System.out.println(epochStartTime); // LocalDateTime.of(2023, 10, 27, 21, 44, 51)
System.out.println(lastAlonzoAbsoluteSlot); // 72316799L
System.out.println(utcTime); // LocalDateTime.of(2023, 11, 22, 12, 47, 9)
System.out.println(epochNo); // 450
System.out.println(lastAlonzoAbsoluteSlot); // 72316799L
```

## Additional Docs
Expand Down

0 comments on commit 27b347c

Please sign in to comment.