|
ROMAN DIGITS AND NUMBERS Practically unuseful module is able to convert roman numbers to decimal and vice versa. Generally roman digits are used in antique clocks, for numbering of appendixes etc. in books and sometimes for copyright years like this:
© MCMXCIX MMIX. All rights reserved.

in the "guess what does it mean" manner. Years before 1999 (MCMXCIX) are rather beautiful, but the next 2000,2002,2003,2004... (MM,MMI,MMII,MMIII,MMIV...) are not (they are very much like PC CPU models).
Module can be called by developer via function (see on this page below the kiwi slice) or in the content file like above.
- Single parameter - convert decimal or roman number to roman or decimal respectively.
- Two parameters - convert two digits and outputs them with predefined separator.
- Three or more parameters - outputs first parameter, two numbers with separator and then the rest of line (full copyright).
- Asterisk * specified instead of number means current year. If two numbers are equal, separator and the second number are ignored.
Roman digits
Roman digit | I | V | X | L | C | D | M | Decimal equivalent | 1 | 5 | 10 | 50 | 100 | 500 | 1000 |
|
- To count the whole number value start to add digits values from left to right.
- When a smaller value is placed before the greater one, it is subtracted. Only one digit allowed in this case to eliminate 4 similar consecutive digits (so it can be 1/10 or 1/5 of a greater value).
MCMXCIX = M+(M-C)+(C-X)+(X-I) = 1000+(1000-100)+(100-10)+(10-1) = 1999 LXXXVIII = L+X*3+V+I*3 = 50+30+5+3 = 88 MIM - wrong for 1999!!!
Please do not forget to specify at least Times New Roman font for Roman numbers!
|
 |