Working hours and SLA deadline calculator
calc_date_working_hoursThe deadline a number of working hours after a start, or the working time between two moments, with office hours, weekends, public holidays and time zones.
Answers the two questions a service-level agreement asks. When is the deadline, if a ticket opened now must be answered within 8 working hours? And how much working time passed between the moment it opened and the moment it closed? Working time is the office hours you give, in the office's time zone, on days that are not a weekend day, a public holiday of the chosen calendar or one of your own closing days. Time outside office hours does not count: a ticket opened on Friday evening starts its clock on Monday morning.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"start": "<start>",
"timezone": "<timezone>"
},
"name": "calc_date_working_hours"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | When the clock stops, to measure the working time. | |
| start | Yes | When the clock starts: a date-time with a UTC offset, or a local time in timezone. | |
| day_end | No | When work ends each day, as HH:MM; 24:00 for midnight. At most 5 characters. | 17:00 |
| options | No | Precision and rounding of the results (default: rounding=half_even, decimals=4). | |
| weekend | No | Days of the week that are not worked. Options: sat_sun: Saturday and Sunday; fri_sat: Friday and Saturday; sun: Sunday only; fri: Friday only; none: no weekend days | sat_sun |
| calendar | No | The public holidays to leave out (2020 to 2030). Omit it to count only weekends and extra_holidays. Options: US: United States (federal holidays); GB-ENG: United Kingdom: England and Wales; GB-SCT: United Kingdom: Scotland; GB-NIR: United Kingdom: Northern Ireland; DE: Germany (the nine nationwide holidays); DE-BW: Germany: Baden-Württemberg; DE-BY: Germany: Bavaria; DE-BE: Germany: Berlin; DE-BB: Germany: Brandenburg; DE-HB: Germany: Bremen; DE-HH: Germany: Hamburg; DE-HE: Germany: Hesse; DE-MV: Germany: Mecklenburg-Vorpommern; DE-NI: Germany: Lower Saxony; DE-NW: Germany: North Rhine-Westphalia; DE-RP: Germany: Rhineland-Palatinate; DE-SL: Germany: Saarland; DE-SN: Germany: Saxony; DE-ST: Germany: Saxony-Anhalt; DE-SH: Germany: Schleswig-Holstein; DE-TH: Germany: Thuringia; FR: France (mainland); NL: Netherlands; IE: Ireland; BE: Belgium; AT: Austria; IT: Italy | |
| timezone | Yes | The IANA time zone the office hours are in. | |
| add_hours | No | Working hours allowed, to find the deadline. Allowed: >= 0 and <= 20000. Unit: hours. | |
| day_start | No | When work starts each day, as HH:MM. At most 5 characters. | 09:00 |
| extra_holidays | No | More days that are not worked, such as company closing days. Up to 1000 items. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| inputs | Yes | The inputs as understood. | |
| result | Yes | ||
| formula | No | ||
| receipt | No | Only with ?receipt=true: a signed receipt for this answer, a JSON Web Token signed with Ed25519 (alg EdDSA). Its claims are iss, iat, jti (the request id), endpoint, date and response (this response without the receipt). Check it with the keys at /.well-known/jwks.json or POST /v1/receipts/verify. | |
| warnings | Yes | ||
| exactness | Yes | For each decimal output: exact; rounded (correctly, to the precision); rounded_uncertified (the last digit could not be proven); or underflow (below 1e-100, reported as 0). | |
| precision | No | The precision and rounding that were applied. | |
| calculator | Yes | The calculator and version that ran. | |
| references | No |