-
Notifications
You must be signed in to change notification settings - Fork 441
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
Parse Seconds from Duration #373
Comments
you could play tricks with dateModify+unixEpoch
|
Hello everyone 👋, I wanted to let you know that this issue has been addressed in the fork of this project at go-sprout/sprout. The fix has been implemented starting from version With new function The function is used to convert the string representation of the duration to the {{ "1m32s" | toDuration | dateModify "+10s" }} // Output: 1m42s For those looking for a solution, I recommend checking out the latest releases of the fork. This should help address the issue discussed in this thread. Thank you! |
Attempting to simplify some templates, and currently I have a section that needs to create a duration and perform some math on it, and output certain fields as seconds. As a result, I need to have my template specify a duration in
hours
,minutes
, andseconds
. Once done, I then multiply those to get seconds, and then convert that duration.Instead, it would be nice to be able to specify a duration and change it.
Current way to have to do this: Link to playground
Desired way to do this: Link to playground
The text was updated successfully, but these errors were encountered: