A new XSLT utility, "Mantissa to Integer" is now available for download. Comments and feedback can be left here but if you discover any issues, please post it on the issue tracker.

We needed to create this for a project today, I thought it may be of some use to others! Pretty specific use-case and behavior at the moment, but will likely extend its functionality as needed.

tl;dr explanation: It'll turn a number like 0.6 into '6p', and 3.6 into '£3.60'.

Mantissa to Integer updated to version 1.1 on 8th of March 2013

I'd never heard the term 'mantissa' before this. You have educated me today, Nathan. Also nice utility. I have a use for this almost immediately.

Hah, I hadn't a few days ago either, you have to thank for that one :) It seems to be a bit of a sketchy definition, but it's very much 'for want of a better name'.

Glad to hear it, let me know if you spot any gremlins!

Mantissa to Integer updated to version 1.2 on 14th of May 2013

Now supports passing non-numeric values through (for dynamic content, i.e. the value is unchanged) and the ability to return fractions of a penny.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details