Skip to content
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] Add Month converter #33122

Merged

Conversation

sinkingpoint
Copy link
Contributor

Description:

This adds in a Month converter that takes a time.Time and returns the int month component. Analogous to what we already have with Hour

Link to tracking Issue: #33106

Testing: Added two unit tests based on the existing Hour ones

Documentation: Added the new converter to the ottlfuncs README.md

pkg/ottl/ottlfuncs/README.md Outdated Show resolved Hide resolved
@sinkingpoint sinkingpoint force-pushed the sinkingpoint/add-month-converter branch from ff2e686 to 9daeb5a Compare May 20, 2024 23:28
@sinkingpoint sinkingpoint force-pushed the sinkingpoint/add-month-converter branch from 9daeb5a to 6ed3767 Compare May 21, 2024 01:00
This adds a `Month` converter that extracts the int
month component from a `time.Time`

Signed-off-by: sinkingpoint <colin@quirl.co.nz>
Signed-off-by: sinkingpoint <colin@quirl.co.nz>
@sinkingpoint sinkingpoint force-pushed the sinkingpoint/add-month-converter branch from 6ed3767 to 2e4e7ca Compare May 21, 2024 23:39
@evan-bradley
Copy link
Contributor

cc @TylerHelmuth if you want to look, this is the same as the Year function. If not, I'll merge this before the end of the week.

@TylerHelmuth TylerHelmuth merged commit ec32eda into open-telemetry:main May 22, 2024
162 checks passed
@github-actions github-actions bot added this to the next release milestone May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants