CEILING in Excel =CEILING(E2,6)/60 for calculating legal billable hours in 6 min increments from minutes (1 min = 0.1, 5 min = 0.1, 7 min = 0.2 etc) when transposed to JS with the CEIL function as:
var legal = Math.ceil(total_time, 6) / 6 where total_time is (date_end - date_start) / 60000 and date_end and date_start field values in ms does not work when values are for eg. 2 min --> 0.2
Inputed values do not provide CEILING in 6 min increments as in Excel, other than values such as 30 min = 0.5
Math.ceildoes not have a second argument,you will need to multiply and divide by 6 to have the same as Excell. eg.Math.ceil(n * 6) / 6