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
    

Free

Package Name

To install this plugin, search for its package name on the Plugin Store and click “Install”.


Information

  • Version 1.0.0
  • Last Update 2/7/2019
  • Active Installs 5
  • Compatibility Craft 3
  • License MIT
  • Categories Templating, Development

Report an issue