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

Fixed #31006 -- Doc'd backslash escaping in date/time template filters. #12128

Merged
merged 1 commit into from Dec 2, 2019

Conversation

ryancheley
Copy link
Sponsor Contributor

Fix for Issue 31006

@felixxm
Copy link
Member

felixxm commented Nov 23, 2019

@ryancheley What do you think about my suggestion? Ticket is also about documenting this in time filter.

@ryancheley
Copy link
Sponsor Contributor Author

@felixxm I think its a great idea and will make update and commit later today or tomorrow.

It is the {% now "jS \o\f F" %}

This would display as "It is the 4th of September".

Copy link
Member

Choose a reason for hiding this comment

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

I don't think that we need a separate example in the date docs. I would rather add a short note to the existing example for es, e.g.

...
outputs ``9 de Enero de 2008`` (the ``DATE_FORMAT`` format specifier for the
``es`` locale is ``r'j \d\e F \d\e Y'``). Both "d" and "e" are
backslash-escaped, because otherwise each is a format string that displays the
day and the timezone name, respectively.

Copy link
Sponsor Contributor Author

Choose a reason for hiding this comment

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

OK. I think I see what you're saying. I'll try again over the holiday weekend. Thanks!

Copy link
Sponsor Contributor Author

Choose a reason for hiding this comment

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

@felixxm I've made the change suggested. Thanks!

@felixxm felixxm self-assigned this Dec 2, 2019
@felixxm felixxm changed the title Ticket 31006 Fixed #31006 -- Doc'd backslash escaping in date/time template filters. Dec 2, 2019
@felixxm
Copy link
Member

felixxm commented Dec 2, 2019

@ryancheley Thanks 👍 I rebased from master and pushed edits.

@felixxm felixxm merged commit a1f14ee into django:master Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants