This function returns a text, similar to the function formatDuration(), but using the work day and work week defined at time tracking configuration, instead of 24 hours per day and 7 days a week. 


formatWorkDuration(duration) #Output: Text



Parser expressionDescription


formatWorkDuration(5 * 8 * {HOUR} + 2 * 8 * {HOUR} + 3 * {HOUR})


This example returns : "1 week, 2 days, 3 hours"

With 8 hours per workday and 5 days per workweek.

{HOUR} is a time macro.




Parameters used in this function

ParameterInput (data type)Description
duration

A number representing a duration or the calculation of a duration.



This function returns a


This function is extremely helpful when you want to automatically calculate the duration in JWT calculated text fields.

If you prefer a more comprehensive representation, have a look at the shortFormatWorkDuration() function.

FunctionOutput
shortFormatWorkDuration()"1d 11h 30m"
formatWorkDuration() "1 day, 11 hours, 30 minutes"





Parser function cloud
Map(error)
NotesThere's no workaround because of the same reason as the previous function.



Use cases and examples





Status
Tech review

Style guide




Short description

Returns a calculated duration using the workday and workweek defined at time tracking configuration.

Output

Available since

Label