3756: Cannot set new year value different than default (first January)
svn: r15079
This commit is contained in:
parent
a83c39eed5
commit
ad9f1c37b7
@ -163,25 +163,21 @@ class DateDisplayFI(DateDisplay):
|
|||||||
if mod == Date.MOD_SPAN:
|
if mod == Date.MOD_SPAN:
|
||||||
d1 = self.display_cal[cal](start)
|
d1 = self.display_cal[cal](start)
|
||||||
d2 = self.display_cal[cal](date.get_stop_date())
|
d2 = self.display_cal[cal](date.get_stop_date())
|
||||||
scal = self.format_extras(cal, newyear)
|
text = u"%s - %s" % (d1, d2)
|
||||||
text = u"%s - %s%s" % (d1, d2, scal)
|
|
||||||
elif mod == Date.MOD_RANGE:
|
elif mod == Date.MOD_RANGE:
|
||||||
stop = date.get_stop_date()
|
stop = date.get_stop_date()
|
||||||
if start[0] == start[1] == 0 and stop[0] == 0 and stop[1] == 0:
|
if start[0] == start[1] == 0 and stop[0] == 0 and stop[1] == 0:
|
||||||
d1 = self.display_cal[cal](start)
|
d1 = self.display_cal[cal](start)
|
||||||
d2 = self.display_cal[cal](stop)
|
d2 = self.display_cal[cal](stop)
|
||||||
scal = self.format_extras(cal, newyear)
|
text = u"vuosien %s ja %s välillä" % (d1, d2)
|
||||||
text = u"vuosien %s ja %s välillä%s" % (d1, d2, scal)
|
|
||||||
else:
|
else:
|
||||||
d1 = self.display_cal[cal](start)
|
d1 = self.display_cal[cal](start)
|
||||||
d2 = self.display_cal[cal](stop)
|
d2 = self.display_cal[cal](stop)
|
||||||
scal = self.format_extras(cal, newyear)
|
text = u"%s ja %s välillä" % (d1, d2)
|
||||||
text = u"%s ja %s välillä%s" % (d1, d2, scal)
|
|
||||||
else:
|
else:
|
||||||
text = self.display_cal[date.get_calendar()](start)
|
text = self.display_cal[date.get_calendar()](start)
|
||||||
scal = self.format_extras(cal, newyear)
|
|
||||||
if mod == Date.MOD_AFTER:
|
if mod == Date.MOD_AFTER:
|
||||||
text = text + u" jälkeen%s" % scal
|
text = text + u" jälkeen"
|
||||||
elif mod == Date.MOD_ABOUT:
|
elif mod == Date.MOD_ABOUT:
|
||||||
text = u"noin " + text
|
text = u"noin " + text
|
||||||
elif mod == Date.MOD_BEFORE:
|
elif mod == Date.MOD_BEFORE:
|
||||||
@ -191,7 +187,7 @@ class DateDisplayFI(DateDisplay):
|
|||||||
# prepend quality
|
# prepend quality
|
||||||
text = u"%s %s" % (self._qual_str[qual], text)
|
text = u"%s %s" % (self._qual_str[qual], text)
|
||||||
|
|
||||||
if cal:
|
if cal or newyear:
|
||||||
# append calendar type
|
# append calendar type
|
||||||
scal = self.format_extras(cal, newyear)
|
scal = self.format_extras(cal, newyear)
|
||||||
text = u"%s %s" % (text, scal)
|
text = u"%s %s" % (text, scal)
|
||||||
|
Loading…
Reference in New Issue
Block a user