Mercurial > babel > old > babel-test
diff babel/dates.py @ 12:a2c54ef107c2
* Removed pkg_resources/setuptools requirement from various places.
* Fixed copyright year in a couple of file headers.
* Some cleanup.
author | cmlenz |
---|---|
date | Thu, 31 May 2007 08:38:54 +0000 |
parents | 9132c9218745 |
children | 76985c08a339 |
line wrap: on
line diff
--- a/babel/dates.py +++ b/babel/dates.py @@ -116,9 +116,9 @@ format. >>> get_date_format(locale='en_US') - <DateTimeFormatPattern u'MMM d, yyyy'> + <DateTimePattern u'MMM d, yyyy'> >>> get_date_format('full', locale='de_DE') - <DateTimeFormatPattern u'EEEE, d. MMMM yyyy'> + <DateTimePattern u'EEEE, d. MMMM yyyy'> :param format: the format to use, one of "full", "long", "medium", or "short" @@ -133,9 +133,9 @@ format. >>> get_time_format(locale='en_US') - <DateTimeFormatPattern u'h:mm:ss a'> + <DateTimePattern u'h:mm:ss a'> >>> get_time_format('full', locale='de_DE') - <DateTimeFormatPattern u"H:mm' Uhr 'z"> + <DateTimePattern u"H:mm' Uhr 'z"> :param format: the format to use, one of "full", "long", "medium", or "short" @@ -204,7 +204,7 @@ raise NotImplementedError -class DateTimeFormatPattern(object): +class DateTimePattern(object): def __init__(self, pattern, format): self.pattern = pattern @@ -327,7 +327,7 @@ :param pattern: the formatting pattern to parse """ - if type(pattern) is DateTimeFormatPattern: + if type(pattern) is DateTimePattern: return pattern result = [] @@ -384,4 +384,4 @@ elif charbuf: append_chars() - return DateTimeFormatPattern(pattern, u''.join(result)) + return DateTimePattern(pattern, u''.join(result))