Convert an integer into roman numerals and vice versa.


Roman provides several Twig methods for easy conversion between integers and roman numerals:

  • You can pass an integer (or a string) into the getRoman() method to get roman numerals:

    {{ craft.roman.getRoman(298) }}     // Output: CCXCVIII
    {{ craft.roman.getRoman('539') }}   // Output: DXXXIX
    
  • You can pass a string (of roman numerals) into the getNumber() method to get an integer:

    {{ craft.roman.getNumber('ML') }}   // Output: 1050
    
  • Roman also includes a helper attribute to quickly get the current year in roman numeral form:

    {{ craft.roman.currentYear }}       // Output: MMXIX
    
Installation Instructions

To install this plugin, copy the command above to your terminal.

Reviews

This plugin doesn't have any reviews.

Active Installs
13
Version
1.0.0
License
MIT
Compatibility
Craft 3, Craft 4
Last release
February 7, 2019
Activity (30 days)
0
Closed Issues
0
Open Issues
0
Merged PRs
0
Open PRs