[Docs] Add date math examples to api-conventions.asciidoc (#25217)

This commit is contained in:
markwalkom 2017-12-08 00:06:58 +11:00 committed by Christoph Büscher
parent 69dd667f5e
commit ee21045697
1 changed files with 5 additions and 6 deletions

View File

@ -215,13 +215,12 @@ The supported units are:
`m`:: minutes
`s`:: seconds
Some examples are:
Assuming `now` is `2001-01-01 12:00:00`, some examples are:
[horizontal]
`now+1h`:: The current time plus one hour, with ms resolution.
`now+1h+1m`:: The current time plus one hour plus one minute, with ms resolution.
`now+1h/d`:: The current time plus one hour, rounded down to the nearest day.
`2015-01-01||+1M/d`:: `2015-01-01` plus one month, rounded down to the nearest day.
`now+1h`:: `now` in milliseconds plus one hour. Resolves to: `2001-01-01 13:00:00`
`now-1h`:: `now` in milliseconds plus one hour. Resolves to: `2001-01-01 11:00:00`
`now-1h/d`:: `now` in milliseconds rounded down to UTC 00:00. Resolves to: `2001-01-01 00:00:00``
`2001-01-01\|\|+1M/d`:: `now` in milliseconds plus one month. Resolves to: `2001-02-01 00:00:00`
[float]
[[common-options-response-filtering]]