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 Year converter #33123

Merged

Conversation

sinkingpoint
Copy link
Contributor

Description:

This adds in a Year 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
pkg/ottl/ottlfuncs/README.md Outdated Show resolved Hide resolved
@sinkingpoint sinkingpoint force-pushed the sinkingpoint/add-year-converter branch from 43ce968 to f0e254e Compare May 20, 2024 23:32
pkg/ottl/ottlfuncs/func_year.go Outdated Show resolved Hide resolved
pkg/ottl/ottlfuncs/func_year.go Outdated Show resolved Hide resolved
pkg/ottl/ottlfuncs/func_year.go Outdated Show resolved Hide resolved
This adds in a `Year` converter that can be used
to extrat the int year 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-year-converter branch from f0e254e to efb86a1 Compare May 21, 2024 23:37
@TylerHelmuth TylerHelmuth merged commit d08b2fb 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

3 participants