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

Filters have been added to Twig syntax #16

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

WebVPF
Copy link
Contributor

@WebVPF WebVPF commented Mar 2, 2024

Added Twig filters time_since and time_tense.

https://github.com/wintercms/winter/blob/d2f284ce6476a3b3d81215281488724a735cb35e/modules/system/ServiceProvider.php#L224-L225

Examples of using:

{{ item.created_at|time_tense }}

{{ '2021-03-06 14:25:55'|time_since }}

{{ 'February 14, 2024 14:30'|time_since }}

{{ '2021-03-06 14:25:55'|time_tense }}

@bennothommo bennothommo merged commit 5f36f14 into wintercms:main Mar 4, 2024
@WebVPF WebVPF deleted the patch-1 branch March 4, 2024 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants