def month(self, number, format=None, default=None): """ Returns a Message with the month name, that can be translated by the TAL engine. Format is either None or 'a' (long or abbreviation). """ if default is None: default = monthname_english(number, format=format) value = 'a' == format and monthname_msgid_abbr(number) or monthname_msgid(number) return PLMF(value, default=default)
def month(self, number, format=None, default=None): """ Returns a Message with the month name, that can be translated by the TAL engine. Format is either None or 'a' (long or abbreviation). """ if default is None: default = monthname_english(number, format=format) value = 'a' == format and monthname_msgid_abbr( number) or monthname_msgid(number) return PLMF(value, default=default)
def month_english(self, number, format=None): """ Returns the english name of month by number. Format is either '' or 'a' (long or abbreviation). >>> ttool = TranslationServiceTool() >>> ttool.month_english(1) 'January' >>> ttool.month_english(1, 'a') 'Jan' """ return monthname_english(number, format=format)