Feature proposal #4970
closedImplement format functions inside format functions
Description
Implement support for format function usage inside of format functions. Example as follows.
strtotime(+1 DAY,strtotime([lastvisitdate]))
Updated by krileon almost 10 years ago
Format function parsing isn't possible using the current structure. It needs to be changed to something that can be parsed better. Example as follows.
[cb:parse function="math"][FIELD_NAME] + [FIELD_NAME][/cb:parse]
This will beak B/C, but there's no other way as the structure has to be changed so it can be parsed properly.
Updated by krileon almost 10 years ago
Additional examples of new usage as follows.
[cb:parse function="date" format="Y-m-d H:i:s"][lastvisitdate][/cb:parse]
[cb:parse function="date" format="Y-m-d H:i:s"][cb:parse function="time"][lastvisitdate][/cb:parse][/cb:parse]
[cb:parse function="date" format="Y-m-d H:i:s"][cb:parse function="time" format="+1 DAY"][lastvisitdate][/cb:parse][/cb:parse]
[cb:parse function="time"][lastvisitdate][/cb:parse]
[cb:parse function="time" format="+1 DAY"][lastvisitdate][/cb:parse]
[cb:parse function="math"]1 + 2[/cb:parse]
[cb:parse function="convert" format="int"][FIELD_NAME][/cb:parse]
[cb:parse function="encode" format="md5"][FIELD_NAME][/cb:parse]
Updated by krileon almost 10 years ago
- % Done changed from 0 to 50
All parsing usages are implemented and working. Reviewing possibility of additional format functions and backend params describing the usage need updated. The math behavior matches PHP parsing 100% so expect correct mathematical results.
Updated by krileon almost 10 years ago
- Status changed from Assigned to Resolved
- % Done changed from 50 to 100