mirror of
https://github.com/bblaz/num2words.git
synced 2025-12-06 06:42:25 +00:00
Merge pull request #468 from ieski/master
[ADD] to ordinal number for Turkish
This commit is contained in:
@@ -806,6 +806,10 @@ class Num2Word_TR(Num2Word_Base):
|
||||
|
||||
return wrd
|
||||
|
||||
def to_ordinal_num(self, value):
|
||||
self.verify_ordinal(value)
|
||||
return "%s%s" % (value, self.to_ordinal(value)[-4:])
|
||||
|
||||
def to_splitnum(self, val):
|
||||
float_digits = str(int(val * 10 ** self.precision))
|
||||
if not int(val) == 0:
|
||||
|
||||
@@ -182,7 +182,11 @@ class Num2WordsTRTest(TestCase):
|
||||
{"test": 101101011010.02, "to": "cardinal",
|
||||
"expected": u"yüzbirmilyaryüzbirmilyononbirbinonvirgüliki"},
|
||||
{"test": 101101011010.2, "to": "cardinal",
|
||||
"expected": u"yüzbirmilyaryüzbirmilyononbirbinonvirgülyirmi"}
|
||||
"expected": u"yüzbirmilyaryüzbirmilyononbirbinonvirgülyirmi"},
|
||||
{"test": 10, "to": "ordinal_num", "expected": u"10uncu"},
|
||||
{"test": 1, "to": "ordinal_num", "expected": u"1inci"},
|
||||
{"test": 3, "to": "ordinal_num", "expected": u"3üncü"},
|
||||
{"test": 6, "to": "ordinal_num", "expected": u"6ıncı"}
|
||||
]
|
||||
|
||||
for casedata in testcases:
|
||||
|
||||
Reference in New Issue
Block a user