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, month, and year converters #33120

Conversation

sinkingpoint
Copy link
Contributor

Description:

Adds in three new ottl converters, Day, Month, and Year, which can be used to extract their respective components from a time.Time

Link to tracking Issue: #33106

Testing: Added unit tests for each, based on the existing converter, Hour

Documentation: Added each to the README.md for ottl

We have converters for the minute/hour of a `time.Time`,
but we don't have them for the rest of the components.
This implements them using the existing time.Time methods.

This is useful for things like `day-month-year` named
files using the new functionality of the file exporter.

Signed-off-by: sinkingpoint <colin@quirl.co.nz>
Signed-off-by: sinkingpoint <colin@quirl.co.nz>
@github-actions github-actions bot requested a review from kentquirk May 20, 2024 02:08
@sinkingpoint sinkingpoint changed the title Sinkingpoint/add day month year [pkg/ottl] Add day, month, and year converters May 20, 2024
@TylerHelmuth
Copy link
Member

@sinkingpoint Thanks for doing this, can you break it into 1 PR per converter?

@sinkingpoint
Copy link
Contributor Author

Sure. Do I need a seperate change log entry for each as well?

@sinkingpoint
Copy link
Contributor Author

Closing this in favor of:

Day: #33121
Month: #33122
Year: #33123

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

2 participants