For correct
date formatting
The best option for executing this task. Using string functions types substr and strpos is not recommended.
. Operates in the same manner as Date function in PHP.
AddWorkDays
Function adds N workdays to the specified date.
Syntax: =addworkdays([date with added days], [number of added workdays]).
Examples:
{{=addworkdays('03.07.2016', 1)}} - result: 09.03.2016 00:00:00, because site settings deem 4 July as a holiday.
{{=addworkdays('05.02.2016 16:14:00', 1)}} - result: because 05.02.2016 - Friday, the result: 08.02.2016 16:14:00 - Monday.
isWorkDay
Checks, if date is a workday (as per Calendar).
Syntax: =if(isWorkDay([checked_date]), [message, if date is a workday], [message, if false]).
Parameter [user] is optional. It can indicate user, which work time must be considered. Available from bizproc module version 19.0.0.
Example: {{=if(isWorkDay({=Template:Parameter1}), 'Yes', 'No')}} - parameter contains date 28.04.2016. Result - Yes, because this day is a workday.
isWorkTime
Similar to the function isWorkDay, but for new data types - Date/Time.
Syntax: =if(isWorkDay([checked date with time]), [message if date with time is during worktime], [message if not during worktime]).
Parameter [user] is optional. It can indicate user, which work time must be considered. Available from bizproc module version 19.0.0.
Example: {{=if(isWorkTime({=Template:Parameter1}), 'Yes', 'No')}} - parameter contains date with time 27.04.2016 15:00:00. Result - Yes, because it's a worktime.
toUserDate
Function coverts any time format into employee time format (with account of hour zone).
toUserDate(
user,
date=now
)
Parameters
user - user. Workflow time format must be converted to this user time format;
date - start date, current time - by default.
GetUserDateOffset
Function returns hour zone time offset in seconds (to server time).
Be advised that string starts from "0" character. For example, the string 'abcdef', position 0 contains character 'a', in position 2 - character 'c', and others.
Merges multiple values into string. Useful when text multiple variables must be printed in the text by non-standard separator (standard: simple comma). Similar to implode in PHP.
Returns string containing string representation of all array elements in a specified order, with value glue between each element.
Implode(
glue,
pieces
)
Parameters:
glue - equals to empty string by default;
pieces - array with merged strings.
explode
Function parses string using separator. It is useful, when string must be parsed and create multiple variable. Similar to explode in PHP.
Returns array with strings, retrieved by splitting the string str using delimiter as a separator.