diff --git a/datetime/README.md b/datetime/README.md index 4c8bc5ad..68faa0b8 100644 --- a/datetime/README.md +++ b/datetime/README.md @@ -47,6 +47,17 @@ times but are supported with this module nonetheless. [`LocalDateTime`](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDateTime.html), and [`OffsetTime`](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetTime.html), which cannot portably be converted to timestamps and are instead represented as arrays when `WRITE_DATES_AS_TIMESTAMPS` is enabled. +* [`Duration`](https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html), which unit can be configured in `JsonFormat` using a [`ChronoUnit`](https://docs.oracle.com/javase/8/docs/api/java/time/temporal/ChronoUnit.html) as `pattern`. For instance: + ```java + @JsonFormat(pattern="MILLIS") + long millis; + + @JsonFormat(pattern="SECONDS") + long seconds; + + @JsonFormat(pattern="DAYS") + long days; + ``` ## Usage