docs-v2/content/flux/v0/stdlib/experimental/date/boundaries/wednesday.md

1.7 KiB

title description menu weight flux/v0/tags introduced
boundaries.wednesday() function `boundaries.wednesday()` returns a record with `start` and `stop` boundary timestamps for last Wednesday.
flux_v0_ref
name parent identifier
boundaries.wednesday experimental/date/boundaries experimental/date/boundaries/wednesday
301
date/time
0.177.1

boundaries.wednesday() returns a record with start and stop boundary timestamps for last Wednesday.

Last Wednesday is relative to now(). If today is Wednesday, the function returns boundaries for the previous Wednesday.

Function type signature
() => {stop: time, start: time}

{{% caption %}} For more information, see Function type signatures. {{% /caption %}}

Examples

Query data collected last Wednesday

import "experimental/date/boundaries"

day = boundaries.wednesday()

from(bucket: "example-bucket")
    |> range(start: day.start, stop: day.stop)