mirror of
https://github.com/bblaz/num2words.git
synced 2025-12-06 06:42:25 +00:00
fixed issues found in this PR
This commit is contained in:
committed by
Ernesto Rodriguez Ortiz
parent
0377347cb9
commit
411a92a4fe
@@ -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"
|
||||||
jointxt="und", longval=longval)
|
lowtxt = "pfennig/e"
|
||||||
return super(Num2Word_DE, self).to_currency(val, jointxt="und",
|
|
||||||
longval=longval)
|
return self.to_splitnum(val, hightxt=hightxt, lowtxt=lowtxt,
|
||||||
|
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(' ', '')
|
||||||
|
|||||||
Reference in New Issue
Block a user