3756: Cannot set new year value different than default (first January)

svn: r15075
This commit is contained in:
Jérôme Rapinat 2010-04-10 18:30:13 +00:00
parent 6b3c125866
commit a83c39eed5

View File

@ -127,9 +127,9 @@ class DateDisplayES(DateDisplay):
u"dic" )
calendar = (
"", u" (Juliano)", u" (Hebreo)",
u" (Revolucionario)", u" (Persa)", u" (Islámico)",
u" (Swedish)"
"", u"Juliano", u"Hebreo",
u"Revolucionario", u"Persa", u"Islámico",
u"Swedish"
)
_mod_str = ("", u"antes de ", u"después de ", u"hacia ", "", "", "")
@ -149,6 +149,7 @@ class DateDisplayES(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]
@ -159,14 +160,17 @@ class DateDisplayES(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'de', d1, u'a', d2, self.calendar[cal])
scal = self.format_extras(cal, newyear)
return "%s%s %s %s %s%s" % (qual_str, u'de', d1, u'a', 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'entre', d1, u'y', d2, self.calendar[cal])
scal = self.format_extras(cal, newyear)
return "%s%s %s %s %s%s" % (qual_str, u'entre', d1, u'y', 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)
#-------------------------------------------------------------------------
#