Project

General

Profile

Actions

Feature proposal #3216

closed

Implement applying PHP formatting functions to conditions

Added by krileon about 12 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
03 February 2012
Due date:
% Done:

100%

Estimated time:

Description

Would be cool to be able to apply formatting functions such as strtotime to conditions to be able to compare dates for example. Other formatting functions should also be added. Perhaps best approach is to just parse the condition and see if it begins with the certain function, remove it, trim the string, then apply the function.

Actions #1

Updated by krileon about 12 years ago

  • Status changed from Assigned to Resolved
  • Target version set to 2.4.0
  • % Done changed from 0 to 100

For now only strtotime is supported. For example you can have a condition of strtotime( [cb_date1] ) Greater Than strtotime( [cb_date2] ). It'll convert the date from its formatted output to a time string for better comparison. If isn't converted then comparing dates becomes very difficult as it's doing a string match, which isn't reliable for formatted dates. Other functions will be added with future releases as needed on request.

Actions #2

Updated by krileon about 12 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF