Closed
Description
Component(s)
pkg/ottl
Is your feature request related to a problem? Please describe.
Currently, OTTL does not support extracting the week day from a time.Time
value.
Describe the solution you'd like
Create a new converter Weekday
, similar to other's time.Time
related converters (Day
, Month
, Year
, etc.).
Ideally, It should return the weekday as an integer (0-6), so users can easily filtering data based on that value, including values range.
Describe alternatives you've considered
The FormatTime converter can be used as an alternative:
- FormatTime(time, "%a") != "Mon"
Although it works, using the FormatTime
converter makes it hard to filter by ranges (e.g from "Mon" to "Thu").