Welcome Guest (Log in)

accountancyFormat()

StarStarStarStarStar
Numbers (5) | Formatting (2) |
General
Expander triangle
  • Author
  • Rating
  • Type
  • Revision
  • Downloaded
  • Updated
  • Steve Checkley
  • StarStarStarStarStar
  • Stack
  • 1
  • 834 Times
  • 17 May 2009
Formats a number according to UK accounting conventions
Useful little function that takes a number and formats it according UK accounting conventions i.e. put brackets around a negative number, adds comma separators etc.

You can also add a leading currency character and change the default characters for the thousands and decimal separators.

Each parameter other than the actual number itself has a default value, making it nice and compact in your own code.

Enjoy!
Ajax Loader
Tags
Expander triangle
User Comments
Expander triangle