diff --git a/docs/durations.adoc b/docs/durations.adoc index 278e269..8f4df9a 100644 --- a/docs/durations.adoc +++ b/docs/durations.adoc @@ -66,12 +66,14 @@ NOTE: TODO Don't forget you can create zone-offsets from durations! NOTE: TODO Don't forget you can create instants from durations - this is often needed when you get Unix times (e.g. JWT OAuth2 tokens) The problem with numeric times is that there are cases where the units -are in seconds and cases where milliseconds are used. If _tick_ were -to convert numbers to times, it would be a source of confusion and -bugs if the units were not clear. For this reason, you cannot convert -numbers to times. However, you can first create the duration from the -number, specifying the units explicitly, and then convert the duration -to an `instant` (or `inst`). +are in seconds and cases where milliseconds are used. To avoid ambiguity +about the units, the recommended approach is to first create the duration +from the number, specifying the units explicitly, and then convert the +duration to an `instant` (or `inst`). + +NOTE: `t/instant` does accept a bare number for convenience, treating it +as epoch milliseconds. The duration-based form below is preferred because +the units are explicit. [source.code,clojure] ---- diff --git a/docs/index.html b/docs/index.html index 70dd4cf..14f00a6 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ - +
The problem with numeric times is that there are cases where the units
-are in seconds and cases where milliseconds are used. If tick were
-to convert numbers to times, it would be a source of confusion and
-bugs if the units were not clear. For this reason, you cannot convert
-numbers to times. However, you can first create the duration from the
-number, specifying the units explicitly, and then convert the duration
-to an instant (or inst).
instant (or inst).
+|
+ Note
+ |
+
+t/instant does accept a bare number for convenience, treating it
+as epoch milliseconds. The duration-based form below is preferred because
+the units are explicit.
+ |
+