Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(22)  |  Call(18)  |  Derive(0)  |  Import(4)
Return the month names used by the locale for the specified format.

>>> get_month_names('wide', locale='en_US')[1]
u'January'
>>> get_month_names('abbreviated', locale='es')[1]
u'ene'
>>> get_month_names('narrow', context='stand-alone', locale='de_DE')[1]
u'J'

:param width: the width to use, one of "wide", "abbreviated", or "narrow"(more...)

        def get_month_names(width='wide', context='format', locale=LC_TIME):
    """Return the month names used by the locale for the specified format.

    >>> get_month_names('wide', locale='en_US')[1]
    u'January'
    >>> get_month_names('abbreviated', locale='es')[1]
    u'ene'
    >>> get_month_names('narrow', context='stand-alone', locale='de_DE')[1]
    u'J'

    :param width: the width to use, one of "wide", "abbreviated", or "narrow"
    :param context: the context, either "format" or "stand-alone"
    :param locale: the `Locale` object, or a locale string
    """
    return Locale.parse(locale).months[context][width]
        


src/b/l/bloodhound-HEAD/trac/trac/util/datefmt.py   bloodhound(Download)
    from babel import Locale
    from babel.core import LOCALE_ALIASES
    from babel.dates import (
        format_datetime as babel_format_datetime,
        format_date as babel_format_date,
        month_names = {}
        for width in ('wide', 'abbreviated'):
            names = get_month_names(width, locale=locale)
            month_names[width] = [names[i + 1] for i in xrange(12)]
        return month_names
    if formats[0].find('%(MMM)s') != -1:
        for width in ('wide', 'abbreviated'):
            names = get_month_names(width, locale=locale)
            for num, name in names.iteritems():
                name = name.lower()

src/t/r/Trac-1.0.1/trac/util/datefmt.py   Trac(Download)
    from babel import Locale
    from babel.core import LOCALE_ALIASES
    from babel.dates import (
        format_datetime as babel_format_datetime,
        format_date as babel_format_date,
        month_names = {}
        for width in ('wide', 'abbreviated'):
            names = get_month_names(width, locale=locale)
            month_names[width] = [names[i + 1] for i in xrange(12)]
        return month_names
    if formats[0].find('%(MMM)s') != -1:
        for width in ('wide', 'abbreviated'):
            names = get_month_names(width, locale=locale)
            for num, name in names.iteritems():
                name = name.lower()

src/t/r/trac-HEAD/trac/util/datefmt.py   trac(Download)
    from babel import Locale
    from babel.core import LOCALE_ALIASES, UnknownLocaleError
    from babel.dates import (
        format_datetime as babel_format_datetime,
        format_date as babel_format_date,
        month_names = {}
        for width in ('wide', 'abbreviated'):
            names = get_month_names(width, locale=locale)
            month_names[width] = [names[i + 1] for i in xrange(12)]
        return month_names
        if formats[0].find('%(MMM)s') != -1:
            for width in ('wide', 'abbreviated'):
                names = get_month_names(width, locale=locale)
                month_names.update((name.lower(), num)
                                   for num, name in names.iteritems())

src/n/a/nagare-0.4.1/nagare/i18n.py   nagare(Download)
          - the month names
        """
        return dates.get_month_names(width, context, self)
 
    def get_quarter_names(self, width='wide', context='format'):

src/a/f/affiliates-HEAD/affiliates/base/context_processors.py   affiliates(Download)
from django.conf import settings
from django.utils.translation import get_language
 
from babel.dates import get_month_names
 
 
    return {
        'mypicker_months_short': get_month_names('abbreviated', locale=locale),
        'mypicker_months_long': get_month_names('wide', locale=locale)
    }

src/f/j/fjord-HEAD/vendor/packages/Babel/tests/test_dates.py   fjord(Download)
def test_get_month_names():
    assert dates.get_month_names('wide', locale='en_US')[1] == u'January'
    assert dates.get_month_names('abbreviated', locale='es')[1] == u'ene'
    de = dates.get_month_names('narrow', context='stand-alone', locale='de_DE')
    assert de[1] == u'J'

src/z/e/ZenPacks.zenoss.OpenStack-HEAD/src/Babel-1.3/tests/test_dates.py   ZenPacks.zenoss.OpenStack(Download)
def test_get_month_names():
    assert dates.get_month_names('wide', locale='en_US')[1] == u'January'
    assert dates.get_month_names('abbreviated', locale='es')[1] == u'ene'
    de = dates.get_month_names('narrow', context='stand-alone', locale='de_DE')
    assert de[1] == u'J'

src/b/a/Babel-1.3/tests/test_dates.py   Babel(Download)
def test_get_month_names():
    assert dates.get_month_names('wide', locale='en_US')[1] == u'January'
    assert dates.get_month_names('abbreviated', locale='es')[1] == u'ene'
    de = dates.get_month_names('narrow', context='stand-alone', locale='de_DE')
    assert de[1] == u'J'