3756: Cannot set new year value different than default (first January)
svn: r15074
This commit is contained in:
@@ -194,12 +194,12 @@ class DateDisplayBG(DateDisplay):
|
||||
|
||||
calendar = (
|
||||
u"",
|
||||
u" (юлиански)",
|
||||
u" (еврейски)",
|
||||
u" (републикански)",
|
||||
u" (персийски)",
|
||||
u" (ислямски)",
|
||||
u" (шведски)"
|
||||
u"юлиански",
|
||||
u"еврейски",
|
||||
u"републикански",
|
||||
u"персийски",
|
||||
u"ислямски",
|
||||
u"шведски"
|
||||
)
|
||||
|
||||
_mod_str = ("", "преди ", "след ", "около ", "", "", "")
|
||||
@@ -282,6 +282,7 @@ class DateDisplayBG(DateDisplay):
|
||||
cal = date.get_calendar()
|
||||
qual = date.get_quality()
|
||||
start = date.get_start_date()
|
||||
newyear = date.get_new_year()
|
||||
|
||||
qual_str = self._qual_str[qual]
|
||||
|
||||
@@ -292,14 +293,17 @@ class DateDisplayBG(DateDisplay):
|
||||
elif mod == Date.MOD_SPAN:
|
||||
d1 = self.display_cal[cal](start)
|
||||
d2 = self.display_cal[cal](date.get_stop_date())
|
||||
return "%s%s %s %s %s%s" % (qual_str, u'от', d1, u'до', d2, self.calendar[cal])
|
||||
scal = self.format_extras(cal, newyear)
|
||||
return "%s%s %s %s %s%s" % (qual_str, u'от', d1, u'до', d2, scal)
|
||||
elif mod == Date.MOD_RANGE:
|
||||
d1 = self.display_cal[cal](start)
|
||||
d2 = self.display_cal[cal](date.get_stop_date())
|
||||
return "%s%s %s %s %s%s" % (qual_str, u'между', d1, u'и', d2, self.calendar[cal])
|
||||
scal = self.format_extras(cal, newyear)
|
||||
return "%s%s %s %s %s%s" % (qual_str, u'между', d1, u'и', d2, scal)
|
||||
else:
|
||||
text = self.display_cal[date.get_calendar()](start)
|
||||
return "%s%s%s%s" % (qual_str, self._mod_str[mod], text, self.calendar[cal])
|
||||
scal = self.format_extras(cal, newyear)
|
||||
return "%s%s%s%s" % (qual_str, self._mod_str[mod], text, scal)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user