Skip to main content
function timeSurcharge(
   amountPerHour,
   window,
   opts?): RuleEntry;
Adds a flat surcharge per hour for the portion of a shift that overlaps a time-of-day window.

Parameters

amountPerHour
number
required
Flat surcharge per hour in smallest currency unit
window
required
Time-of-day window
opts
CostRuleOptionsEntity and time scoping

Returns

RuleEntry The window supports overnight spans (e.g., 22:00-06:00). The surcharge is independent of the member’s base rate.

Example

timeSurcharge(200, { from: t(22), until: t(6) })