Skip to content

Commit

Permalink
Merge "[IMPR] provide XXXI with romanNumToInt() and intToRomanNum() f…
Browse files Browse the repository at this point in the history
…unctions"
  • Loading branch information
jenkins-bot authored and Gerrit Code Review committed Oct 19, 2024
2 parents fb4f954 + bb9a157 commit df61a18
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pywikibot/date.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,10 +335,12 @@ def localDigitsStrToInt(value: str, digitsToLocalDict: Mapping[int, str],


# Helper for roman numerals number representation
_romanNumbers = ['-', 'I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX',
'X', 'XI', 'XII', 'XIII', 'XIV', 'XV', 'XVI', 'XVII', 'XVIII',
'XIX', 'XX', 'XXI', 'XXII', 'XXIII', 'XXIV', 'XXV', 'XXVI',
'XXVII', 'XXVIII', 'XXIX', 'XXX']
_romanNumbers = [
'-', 'I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X', 'XI',
'XII', 'XIII', 'XIV', 'XV', 'XVI', 'XVII', 'XVIII', 'XIX', 'XX', 'XXI',
'XXII', 'XXIII', 'XXIV', 'XXV', 'XXVI', 'XXVII', 'XXVIII', 'XXIX', 'XXX',
'XXXI',
]


def intToRomanNum(i: int) -> str:
Expand Down

0 comments on commit df61a18

Please sign in to comment.