-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
Add parseduration() function #27048
base: main
Are you sure you want to change the base?
Add parseduration() function #27048
Conversation
I found myself needing this to better express durations where an integer is expected. I made the choice to truncate the result when it cannot be exactly represented in the given unit because it seems to me that most of the time providers are expecting an integer rather than an |
Codecov Report
|
Is there anything needed here apart from resolving conflicts? |
Can we get some movement on this? I have found myself needing this several times in the years since this PR was originally raised and it seems like a relatively simple thing to review & merge (once conflicts have been resolved). |
Thanks for this submission and the PR bump. As for getting a PR accepted, please see this comment: #28855 (comment), specifically:
Reviewing the comments on the original issue, my guess is that this would more likely be considered as a plugin function, rather than as a built-in function. However, I'll bring this up for review in triage to see where it stands. Thanks again! |
Confirmed that this is currently considered more appropriate as a plugin function rather than as a built-in. I will update this PR when such functionality is available. Thanks! |
Closes #16474