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

Add datetimeparse Jinja2 template helper filter function #4312

Merged
merged 3 commits into from May 13, 2024

Conversation

jorgeav
Copy link
Contributor

@jorgeav jorgeav commented May 5, 2024

What this PR does

Jinja2 filter to parse strings into datetime objects. Previously, only a limited set of strings could be parsed into datetime objects (datetime_re).

The addition of this filter allows for strings of any format to be converted into datetime.

Which issue(s) this PR closes

Checklist

  • Unit, integration, and e2e (if applicable) tests updated
  • Documentation added (or pr:no public docs PR label added if not required)
  • Added the relevant release notes label (see labels prefixed w/ release:). These labels dictate how your PR will
    show up in the autogenerated release notes.

@jorgeav jorgeav requested review from a team as code owners May 5, 2024 01:45
Copy link
Collaborator

@joeyorlando joeyorlando left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for your contribution @jorgeav!

@joeyorlando joeyorlando changed the title Jinja2 template helper filter datetimeparse Jinja2 template helper filter datetimeparse May 13, 2024
@joeyorlando joeyorlando added the release:enhancement PR will be added to "Exciting New Features 🎉" section of release notes label May 13, 2024
@joeyorlando joeyorlando changed the title Jinja2 template helper filter datetimeparse Add datetimeparse Jinja2 template helper filter function May 13, 2024
@joeyorlando joeyorlando added this pull request to the merge queue May 13, 2024
Merged via the queue into grafana:dev with commit dba6748 May 13, 2024
18 checks passed
@jorgeav jorgeav deleted the datetimeparse-jinja2-filter branch May 13, 2024 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:enhancement PR will be added to "Exciting New Features 🎉" section of release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants