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 Day converter #33121

Merged

Conversation

sinkingpoint
Copy link
Contributor

Description:

This adds in a Day converter that takes a time.Time and returns the int day 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
.chloggen/add-day-converter.yaml Outdated Show resolved Hide resolved
@sinkingpoint sinkingpoint force-pushed the sinkingpoint/add-day-converter branch from 0dff0be to ae60a8a Compare May 20, 2024 23:31
@sinkingpoint
Copy link
Contributor Author

Thanks for the review @evan-bradley ! I've updated it with your changes. Those build failures seem unrelated?

This adds a `Day` converter that extracts the int
day 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-day-converter branch from ae60a8a to 3823c42 Compare May 21, 2024 23:38
@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.

Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com>
@TylerHelmuth TylerHelmuth added the ready to merge Code review completed; ready to merge by maintainers label May 22, 2024
@evan-bradley evan-bradley merged commit 6df00e3 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
pkg/ottl ready to merge Code review completed; ready to merge by maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants