Project

General

Profile

Actions

Feature proposal #5977

closed

Extend math format function with sub functions

Added by krileon over 8 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
24 May 2016
Due date:
% Done:

100%

Estimated time:

Description

Example as follows.

[cb:parse function="math" method="round" length="2"]1.00000[/cb:parse]

This is after the regular math parsing has applied. So you could do the following.

[cb:parse function="math" method="round" length="2"]2 / 3 - 5 + 1.00000[/cb:parse]

https://www.joomlapolis.com/forum/255-developer-members-support/233779-auto-action-format-function-money-or-number

Actions #1

Updated by beat over 8 years ago

or maby a sprintf="...." - attribute functionality, as sprintf can do the decimals and number formatting as well ?

Actions #2

Updated by krileon about 7 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100

Following methods are now supported for math function.

round (parameters: decimal), ceil, floor, abs, number (parameters: decimals, decimal, and separator)

These are applied after the math has been processed so you can format it to a number, round it, etc.. after doing some math.

Actions #3

Updated by krileon about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF