Mercurial > babel > old > babel-test
diff babel/dates.py @ 344:4cba69c7d4bf
Fix for incorrect month context lookup in date formatting. Closes #75. Thanks to Andrew Stromnov for reporting the problem and providing a patch.
author | cmlenz |
---|---|
date | Mon, 16 Jun 2008 11:37:52 +0000 |
parents | 85c7bc435674 |
children | 64d340f76701 |
line wrap: on
line diff
--- a/babel/dates.py +++ b/babel/dates.py @@ -751,7 +751,7 @@ if num <= 2: return ('%%0%dd' % num) % self.value.month width = {3: 'abbreviated', 4: 'wide', 5: 'narrow'}[num] - context = {3: 'format', 4: 'format', 5: 'stand-alone'}[num] + context = {'M': 'format', 'L': 'stand-alone'}[char] return get_month_names(width, context, self.locale)[self.value.month] def format_week(self, char, num):