fixed issues found in this PR

This commit is contained in:
romangraef
2018-10-04 22:56:29 +02:00
committed by Ernesto Rodriguez Ortiz
parent 0377347cb9
commit 411a92a4fe

View File

@@ -117,13 +117,17 @@ class Num2Word_DE(Num2Word_EU):
return str(value) + "." return str(value) + "."
def to_currency(self, val, longval=True, old=False): def to_currency(self, val, longval=True, old=False):
hightxt = "euro"
lowtxt = "cent"
if old: if old:
return self.to_splitnum(val, hightxt="mark/s", lowtxt="pfennig/e", hightxt = "mark"
lowtxt = "pfennig/e"
return self.to_splitnum(val, hightxt=hightxt, lowtxt=lowtxt,
jointxt="und", longval=longval) jointxt="und", longval=longval)
return super(Num2Word_DE, self).to_currency(val, jointxt="und",
longval=longval)
def to_year(self, val, longval=True): def to_year(self, val, longval=True):
if not (val // 100) % 10: if not (val // 100) % 10:
return self.to_cardinal(val) return self.to_cardinal(val)
return self.to_splitnum(val, hightxt="hundert", longval=longval) return self.to_splitnum(val, hightxt="hundert", longval=longval)\
.replace(' ', '')