====TimeCalc==== Performs a calculation on **times** either a //frame// or the table items inside the frame. ===Parameters=== ^Name^Default^Meaning^ |name||The name of the final attribute/column| |amount|100|The amount to be changed by. [[substitution|Substitutable]].| |method|Add|**add**, **sub** or **perc**| |start|StartTime|The start/base date to work from| |end|EndTime|The end date (used for the 'perc' method)| |multiplier|1|A multiplier to apply| ===Description=== This function performs a calculation on a frame, or - if the frame contains a table - the individual items within the table. The capture attribute or column named **name** will be updated. If using the **Add** method, //amount// x //multiplier// seconds will be added to the start date. If using the **Sub** method, //amount// x //multiplier// seconds will be deducted from the start date. If using the **Perc** method, a time will be picked //amount// percentage of the distance between the start and end date. ===Example 1=== If the frame contains the following attributes... ^Attribute^Value^ |StartTime|10:20| |EndTime|10:40| { "type": "timecalc", "name": "LateStart", "amount": 120, "method": "add" } The final results will include the //LateStart// attribute that is 10:22 - 120 seconds would have been added. ===Example 2=== If the frame contains the following attributes... ^Attribute^Value^ |StartTime|10:20| |EndTime|10:40| { "type": "timecalc", "name": "MidTime", "amount": 50 "method": "perc" } The final results will include the //MidTime// attribute that is 10:30 - 50% of the distance between 10:20 and 10:40.