Skip to content

Conversation

@meld-cp
Copy link
Contributor

@meld-cp meld-cp commented Sep 21, 2025

Fixes #173

Added a new function in DateTimeFunctions and linked it to the Liquid date function.

The Liquid date function seems to use the format argument as an output format where as the DateTimeFunctions.Parse function uses the pattern as an input format to parse the date.

According to the Liquid docs:
{{ "March 14, 2016" | date: "%b %d, %y" }} should result in Mar 14, 16

@meld-cp meld-cp marked this pull request as draft September 22, 2025 09:27
- refactor parse functions
- rename `parse_with_formatted_output` builtin to `parse_to_string`
- add xml docs
@meld-cp meld-cp marked this pull request as ready for review September 22, 2025 11:21
@xoofx xoofx merged commit a3407eb into scriban:master Sep 22, 2025
1 check passed
@xoofx
Copy link
Member

xoofx commented Sep 22, 2025

Thanks for the fix! I like the name of date.parse_to_string that conveys the similarity with date.parse and date.to_string

@xoofx xoofx added the bug label Sep 22, 2025
@meld-cp meld-cp deleted the liquid-date-formatting branch September 22, 2025 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Liquid Date Filter returning error

2 participants