-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pkg/ottl] Support Weekday for time.Time's in OTTL #38126
Labels
Comments
Pinging code owners: See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This sounds like a valid enhancement and I'm removing the |
Hi, I would like to take this if possible |
@TylerHelmuth, let me know if you're handling this one. If not, I can assign it to @odubajDT. |
Should be ready for review #38264 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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'stime.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").Additional context
#38122
The text was updated successfully, but these errors were encountered: