From 7292af85422980df3fefcd0ce131f8a37fe466e9 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Mon, 13 Dec 2010 13:51:28 +0000 Subject: [PATCH] Fixed #14570 -- Added new date format character for alternative month names using the new context capabilities. Also add context to Associated Press style month names (refs #9988). Thanks to Claude and shell_dweller. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14899 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/utils/dateformat.py | 8 ++++++-- django/utils/dates.py | 16 +++++++++++++++- docs/ref/templates/builtins.txt | 3 +++ 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/django/utils/dateformat.py b/django/utils/dateformat.py index efec5c35fe..f89300938e 100644 --- a/django/utils/dateformat.py +++ b/django/utils/dateformat.py @@ -14,12 +14,12 @@ Usage: import re import time import calendar -from django.utils.dates import MONTHS, MONTHS_3, MONTHS_AP, WEEKDAYS, WEEKDAYS_ABBR +from django.utils.dates import MONTHS, MONTHS_3, MONTHS_ALT, MONTHS_AP, WEEKDAYS, WEEKDAYS_ABBR from django.utils.tzinfo import LocalTimezone from django.utils.translation import ugettext as _ from django.utils.encoding import force_unicode -re_formatchars = re.compile(r'(?