From ee21045697800810b07140729ae9289400d5d74f Mon Sep 17 00:00:00 2001 From: markwalkom Date: Fri, 8 Dec 2017 00:06:58 +1100 Subject: [PATCH] [Docs] Add date math examples to api-conventions.asciidoc (#25217) --- docs/reference/api-conventions.asciidoc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/reference/api-conventions.asciidoc b/docs/reference/api-conventions.asciidoc index 3d8cba18e05..db138912683 100644 --- a/docs/reference/api-conventions.asciidoc +++ b/docs/reference/api-conventions.asciidoc @@ -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]]