Skip to content

Commit 4aa2217

Browse files
markwalkomcbuescher
authored andcommitted
[Docs] Add date math examples to api-conventions.asciidoc (#25217)
1 parent 9c215dc commit 4aa2217

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

docs/reference/api-conventions.asciidoc

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,13 +215,12 @@ The supported units are:
215215
`m`:: minutes
216216
`s`:: seconds
217217

218-
Some examples are:
218+
Assuming `now` is `2001-01-01 12:00:00`, some examples are:
219219

220-
[horizontal]
221-
`now+1h`:: The current time plus one hour, with ms resolution.
222-
`now+1h+1m`:: The current time plus one hour plus one minute, with ms resolution.
223-
`now+1h/d`:: The current time plus one hour, rounded down to the nearest day.
224-
`2015-01-01||+1M/d`:: `2015-01-01` plus one month, rounded down to the nearest day.
220+
`now+1h`:: `now` in milliseconds plus one hour. Resolves to: `2001-01-01 13:00:00`
221+
`now-1h`:: `now` in milliseconds plus one hour. Resolves to: `2001-01-01 11:00:00`
222+
`now-1h/d`:: `now` in milliseconds rounded down to UTC 00:00. Resolves to: `2001-01-01 00:00:00``
223+
`2001-01-01\|\|+1M/d`:: `now` in milliseconds plus one month. Resolves to: `2001-02-01 00:00:00`
225224

226225
[float]
227226
[[common-options-response-filtering]]

0 commit comments

Comments
 (0)