Module:foreign numerals/documentation

From Wiktionary, the free dictionary
Jump to navigation Jump to search
Documentation for Module:foreign numerals. [edit]
This page contains usage information, categories, interwiki links and other content describing the module.

This module provides conversion to and from foreign numerals to native numerical values. It's partially redundant with Module:roman numerals.

Numeral system "From" function "To" function
Roman numerals from_Roman to_Roman
Armenian numerals from_Armenian
Hebrew numerals from_Hebrew to_Hebrew
Indian numerals from_Indian to_Indian

Each function may be called either from a template (see below) or from a module. "From" functions return native numerical values (of 'number' type), while "to" functions return strings.

Example:

{{#invoke:foreign numerals|to_Roman|2764}}

gives

MMDCCLXIV

And the reverse function:

{{#invoke:foreign numerals|from_Roman|MMDCCLXIV}}

gives

2764

This module serves as a backend to the templates {{R2A}} and {{A2R}}.