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

templates: add parseTime func #807

Merged
merged 2 commits into from
Dec 3, 2022
Merged

templates: add parseTime func #807

merged 2 commits into from
Dec 3, 2022

Conversation

jo3-l
Copy link
Contributor

@jo3-l jo3-l commented Nov 25, 2020

Parsing time strings into time structs in custom commands has long been a pain point. This PR aims to fix this by exposing time.ParseInLocation for usage in CCs. I wasn't sure what restrictions this function should have internally - should the number of layouts if it's in the form of a string slice be restricted?

I have tested this code on a selfhost and it appears to work fine.

@jo3-l jo3-l changed the title templates: add tmplParseTime wip: templates: add tmplParseTime Nov 25, 2020
@jo3-l jo3-l marked this pull request as draft November 25, 2020 15:59
@jo3-l jo3-l changed the title wip: templates: add tmplParseTime templates: add tmplParseTime Nov 26, 2020
@jo3-l jo3-l marked this pull request as ready for review November 26, 2020 23:40
@jo3-l jo3-l changed the title templates: add tmplParseTime templates: add parseTime func Jun 1, 2021
@jo3-l jo3-l changed the title templates: add parseTime func templates: add funcs for parsing time Jun 15, 2021
@jo3-l jo3-l marked this pull request as draft June 15, 2021 04:59
@jo3-l jo3-l force-pushed the patch-4 branch 2 times, most recently from a5af798 to 9fc60d0 Compare June 15, 2021 05:24
@jo3-l jo3-l marked this pull request as ready for review June 15, 2021 05:24
@jo3-l jo3-l changed the title templates: add funcs for parsing time templates: add parseTime func Jun 15, 2021
@ashishjh-bst ashishjh-bst merged commit 05507b1 into botlabs-gg:dev Dec 3, 2022
@jo3-l jo3-l deleted the patch-4 branch June 29, 2023 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants