Guide · Chile utilities
Chile business days API: compute deadlines and count business days between dates as JSON
How to find the day a business-day deadline falls and how many business days lie between two dates in Chile, from your code or an AI agent: Monday to Friday or with Saturday as a business day, versus calendar days, with national, regional and local holidays. With Better Llama's MCP tool, no key or sign-up.
What is a business day in Chile? It depends on the deadline's rule
There is no single definition. For deadlines in proceedings before government agencies, Ley 19.880 says days are business days and that Saturdays, Sundays and holidays are non-business days. In a civil lawsuit, the Code of Civil Procedure says business days are those that are not holidays, so Saturday counts. And when the law says nothing, the Civil Code counts calendar days, holidays included, unless the period is in “useful days” (días útiles).
| Rule | Does Saturday count? | How to compute it |
|---|---|---|
| Ley 19.880, art. 25 (administrative procedure) | No: Saturdays, Sundays and holidays are non-business days | sumar_dias_habiles (default) |
| Code of Civil Procedure, arts. 59 and 66 | Yes: “business days are those that are not holidays” | sumar_dias_habiles with "saturdayIsBusinessDay": true |
| Civil Code, art. 50 (general rule for statutory periods) | Yes, and holidays too (calendar days), unless the period says “useful days” | Date + N days; sumar_dias_habiles only if the period is in useful days |
The chile_calendar_and_rut tool computes both business-day variants from Chile's holiday laws (2022 to 2035), with no external calls: sumar_dias_habiles for when a deadline falls and dias_habiles to count business days between two dates. This guide is informational, not legal advice: always check which rule governs your deadline. For the list of holidays of each year, see the Chile public holidays API guide.
Step by step: compute a business-day deadline
Step 1. Choose the rule
By default the tool counts Monday to Friday without holidays, like Ley 19.880. For deadlines that count Saturdays, add "saturdayIsBusinessDay": true. If the deadline runs in a region or commune with its own holiday, add region or comuna.
Step 2. Connect the MCP server
Use the MCP https://mcp.betterllama.com/mcp in your client (configuration below) or call it over HTTP with JSON-RPC. No key or sign-up is needed during the beta.
Step 3. Call the tool
With curl, a 10-business-day deadline from a notice served on Friday 4 December 2026:
curl -s https://mcp.betterllama.com/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "chile_calendar_and_rut", "arguments": {"operation": "sumar_dias_habiles", "startDate": "2026-12-04", "businessDays": 10}}}'Real, complete response (23 November 2026, 18:21 Chile time). The deadline falls on Monday 21 December 2026: counting starts the day after startDate and skips the Tuesday 8 December holiday (Inmaculada Concepción). The tool's notes come in Spanish.
{
"tool": "chile_calendar_and_rut",
"count": 1,
"results": [
{
"kind": "sumar_dias_habiles",
"startDate": "2026-12-04",
"businessDays": 10,
"resultDate": "2026-12-21",
"resultWeekday": "lunes",
"saturdayIsBusinessDay": false,
"source": "Cálculo local según la legislación chilena (Código del Trabajo y leyes citadas en legalBasis); fechas electorales según Ley 18.700.",
"note": "Se cuenta desde el día siguiente a startDate (excluido)."
}
],
"warnings": [],
"stopReason": "completed",
"attribution": "Calculado por Better Llama a partir de leyes de feriados y la División Político-Administrativa publicadas por el Estado de Chile.",
"source": "https://betterllama.com/",
"retrievedAt": "2026-11-23T21:21:58.355Z"
}In Python, the deadline table for 5, 10 and 15 days from that same notice, comparing calendar days, Monday-to-Friday business days and business days including Saturday:
import json
from datetime import date, timedelta
import requests
MCP = "https://mcp.betterllama.com/mcp"
HEADERS = {"Accept": "application/json, text/event-stream"}
def call(arguments):
body = {"jsonrpc": "2.0", "id": 1, "method": "tools/call",
"params": {"name": "chile_calendar_and_rut", "arguments": arguments}}
r = requests.post(MCP, json=body, headers=HEADERS, timeout=60)
r.raise_for_status()
return json.loads(r.json()["result"]["content"][0]["text"])
def deadline(start, days, saturday_counts=False):
data = call({"operation": "sumar_dias_habiles", "startDate": start,
"businessDays": days, "saturdayIsBusinessDay": saturday_counts})
return data["results"][0]["resultDate"]
# Notice served on Friday 4 December 2026: when does each deadline fall?
notice = "2026-12-04"
print("days | calendar | Mon-Fri | incl. Saturday")
for days in (5, 10, 15):
calendar = (date.fromisoformat(notice) + timedelta(days=days)).isoformat()
print(f"{days:>4} | {calendar} | {deadline(notice, days)} | {deadline(notice, days, True)}")Real output (23 November 2026, 18:23 Chile time):
days | calendar | Mon-Fri | incl. Saturday
5 | 2026-12-09 | 2026-12-14 | 2026-12-11
10 | 2026-12-14 | 2026-12-21 | 2026-12-17
15 | 2026-12-19 | 2026-12-29 | 2026-12-23In JavaScript (Node.js 18 or later, as an .mjs module), the business days between order and delivery for three shipments, for example to measure a service-level agreement:
const MCP = "https://mcp.betterllama.com/mcp";
async function call(args) {
const r = await fetch(MCP, {
method: "POST",
headers: { "Content-Type": "application/json", Accept: "application/json, text/event-stream" },
body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "tools/call",
params: { name: "chile_calendar_and_rut", arguments: args } }),
});
const json = await r.json();
return JSON.parse(json.result.content[0].text);
}
// Business days (both ends included) between order and delivery
const shipments = [["2026-12-22", "2026-12-29"], ["2026-12-30", "2027-01-05"], ["2027-03-24", "2027-03-30"]];
for (const [order, delivery] of shipments) {
const { results } = await call({ operation: "dias_habiles", fromDate: order, toDate: delivery });
const d = results[0];
console.log(order, "→", delivery, d.businessDays, "business days of", d.calendarDays, "|", d.holidays.join(", ") || "no holidays");
}Real output:
2026-12-22 → 2026-12-29 5 business days of 8 | 2026-12-25 Navidad
2026-12-30 → 2027-01-05 4 business days of 7 | 2027-01-01 Año Nuevo
2027-03-24 → 2027-03-30 4 business days of 7 | 2027-03-26 Viernes SantoStep 4. Use the result
sumar_dias_habiles returns resultDate, resultWeekday (in Spanish), saturdayIsBusinessDay and, if you gave them, regionCode and comunaCode. dias_habiles returns calendarDays, businessDays, weekendDays, holidaysOnWorkdays and the holidays list with the holidays that fell on days that would otherwise have counted.
Calendar days, business days and Saturdays: one deadline, three dates
For a notice served on Friday 4 December 2026, these are the real deadlines the tool returned (calendar days are computed by adding N days to the date):
| Period | Calendar days | Business days (Mon–Fri) | Business days incl. Saturday |
|---|---|---|---|
| 5 days | Wed 9 Dec 2026 | Mon 14 Dec 2026 | Fri 11 Dec 2026 |
| 10 days | Mon 14 Dec 2026 | Mon 21 Dec 2026 | Thu 17 Dec 2026 |
| 15 days | Sat 19 Dec 2026 | Tue 29 Dec 2026 | Wed 23 Dec 2026 |
- With 5 days, Monday-to-Friday and Saturday-included differ by a whole business day: Saturday 5 December counts as day 1 in the second column but not in the first.
- The 15 calendar days end on a Saturday. In proceedings under Ley 19.880, a deadline whose last day is a non-business day is extended to the next business day; other rules have their own, so check the one that applies.
- A 5-day deadline including Saturdays from Monday 21 December 2026 falls on Monday 28 December 2026 (Saturday 26 is day 4 and Christmas is skipped); Monday to Friday, on Tuesday 29 December 2026.
Count business days between two dates: 2027 business days by month
dias_habiles counts both ends, fromDate and toDate: Monday 23 to Friday 27 November 2026 returned 5 business days. These are the national 2027 business days it returned month by month, without a region:
| Month | Days | Business days (Mon–Fri) | Business days incl. Saturday |
|---|---|---|---|
| January | 31 | 20 | 25 |
| February | 28 | 20 | 24 |
| March | 31 | 22 | 25 |
| April | 30 | 22 | 26 |
| May | 31 | 20 | 24 |
| June | 30 | 20 | 24 |
| July | 31 | 21 | 26 |
| August | 31 | 22 | 26 |
| September | 30 | 22 | 25 |
| October | 31 | 20 | 25 |
| November | 30 | 21 | 25 |
| December | 31 | 22 | 25 |
| 2027 total | 365 | 252 | 300 |
2027 has 9 national holidays on Monday-to-Friday days; with Saturdays as business days that rises to 13, adding those that fall on a Saturday (such as 1 May and 18 September). The 2027 figures use the laws in force on 23 November 2026: if a new law adds or moves a holiday, they change.
Edge cases worth knowing
- Counting starts the next day. The response says so in
note:Se cuenta desde el día siguiente a startDate (excluido).
(“counted from the day after startDate, excluded”). IfstartDateis a holiday nothing changes: from Friday 25 December 2026, 1 business day is Monday 28 December 2026. - With
businessDays0 the date comes back unchanged, even on a holiday (2026-12-25 → 2026-12-25). To get the first business day from a date, use the previous day and 1 business day: from 24 December, 1 business day gives Monday 28 December 2026. Use it to move a calendar-day deadline that ends on a non-business day to the next business day. - Subtracting works too: with
businessDays-5 from Monday 4 January 2027 the answer was Thursday 24 December 2026, skipping New Year's Day and Christmas. - A Saturday holiday is still a non-business day when Saturdays count: the week of 22 to 28 March 2027 has 4 business days with
saturdayIsBusinessDay, because Good Friday and Holy Saturday are holidays. Without that option, Holy Saturday counts as a weekend day and does not show inholidays. - 31 December is a business day by default. It is a holiday only for banks: from 30 December 2026, 1 business day gives the 31st; with
"includeBank": trueit gives Monday 4 January 2027. - A single day can be counted too: 25 to 25 December 2026 has 0 business days and 1 holiday. To check a list of separate dates, use
es_feriado, which returnsisBusinessDayfor each date.
Real errors (the response carries isError and a clear message, in Spanish):
- Reversed dates:
"fromDate" debe ser anterior o igual a "toDate".
- A format other than YYYY-MM-DD:
"startDate" debe ser una fecha AAAA-MM-DD válida (recibido: 04-12-2026).
- Outside the year range:
"fromDate" debe estar entre 2022 y 2035 (recibido: 2036-01-01).
- More than 2000 business days:
"businessDays" debe ser un entero entre -2000 y 2000.
Regional and local holidays inside a deadline
Without region or comuna, the tool uses national holidays only. Monday 7 June 2027 is a holiday only in the Arica y Parinacota Region (Asalto y Toma del Morro de Arica): from Friday 4 June, 1 business day gives Monday 7 June 2027 nationally and Tuesday 8 June 2027 with "region": "15". "comuna": "15101" (Arica) gives the same: the commune already implies its region.
In Chillán and Chillán Viejo, 20 August is a local holiday: August 2026 has 21 business days across Chile and 20 with "comuna": "Chillán". Region and commune codes are in the Chile communes API guide.
Deadlines in forms and systems
If your system asks for a date to compute a deadline, use a native date field with a visible label (not just placeholder text inside the field) and show the result with the weekday and the month in words, like “Mon 21 Dec 2026”, to avoid mixing up day and month. Store the date in ISO format (2026-12-21), the one the tool uses, and record the rule applied (with or without Saturdays, region or commune).
Business days from your AI agent (MCP)
Add Better Llama's MCP server in your client (Claude, Cursor, VS Code or any other with remote MCP). One MCP brings chile_calendar_and_rut and the rest of the catalog, with no sign-up during the beta.
{
"mcpServers": {
"better-llama": {
"url": "https://mcp.betterllama.com/mcp"
}
}
}claude mcp add --transport http better-llama https://mcp.betterllama.com/mcpSetup for Claude, Codex, Gemini CLI, Windsurf, VS Code and other clients: connect your agent.
Ready-to-run Python and Node.js examples, with config files for each client: examples repository on GitHub.
Then ask, for example: “I was notified on Friday 4 December 2026 and have 10 administrative business days in Chile. When is the deadline?” or “How many business days does March 2027 have in Chile?” The agent computes with the legal calendar instead of counting from memory, where a holiday is easy to miss.
Beta: free and with no sign-up while we test the service.
Pricing
Free during the beta, no sign-up, with a limit of 60 requests per minute per IP. If paid plans come later, we will announce them first on betterllama.com.
Frequently asked questions
How do I compute a business-day deadline in Chile by API?
Call chile_calendar_and_rut with operation sumar_dias_habiles, startDate (the notice date) and businessDays. For example, 10 business days from Friday 4 December 2026 end on Monday 21 December, because the 8 December holiday is skipped.
Is Saturday a business day in Chile?
It depends on the rule. Under Ley 19.880 (administrative procedure) Saturday is a non-business day; under the Code of Civil Procedure business days are those that are not holidays, so Saturday counts. The tool counts Monday to Friday by default and adds Saturdays with saturdayIsBusinessDay.
What is the difference between calendar days and business days?
Calendar days count every day, holidays included; that is the general rule of article 50 of the Civil Code unless the period is in useful days. Business days skip weekends (or only Sundays) and holidays. From 4 December 2026, 15 calendar days end on 19 December and 15 business days on the 29th.
From which day does a deadline start counting?
Under Ley 19.880, from the day after the notice or publication. sumar_dias_habiles also counts from the day after startDate, so use the notice date as startDate.
How many business days does 2027 have in Chile?
According to the tool, with the national holidays in force on 23 November 2026: 252 Monday-to-Friday business days and 300 if non-holiday Saturdays count. By region or commune it can be one fewer.
Does the API take regional and local holidays into account?
Yes, if you give region or comuna. For example, 7 June 2027 is a holiday only in the Arica y Parinacota Region, and 20 August in Chillán and Chillán Viejo. Without those parameters only national holidays apply.
What if the deadline ends on a non-business day?
sumar_dias_habiles always ends on a business day. If you compute the last day another way (calendar days or months) and it is a non-business day, Ley 19.880 extends it to the next business day; you get that day with sumar_dias_habiles from the previous day and 1 business day. Other rules may differ.
Is there a free Chile business days API?
Yes. The chile_calendar_and_rut tool on Better Llama's MCP computes business days and deadlines for free during the beta, with no sign-up, over MCP or JSON-RPC, with a limit of 60 requests per minute per IP. It is informational and does not replace checking the rule of each deadline.
Keep going
- Chile public holidays API guide: every holiday of the year, mandatory days off and their legal basis, with the same tool.
- Chile communes API guide: region and commune codes for local holidays.
- Chile RUT validation API guide: check digit, formats and batches with the same tool.
- Chile official gazette API guide: rules published each day, from which many deadlines run.
- Chile utilities tool page: parameters, example and FAQ.
Other guides
- Chile open data APIs: official sources by API and MCP — map of the official Chilean sources available by API and MCP, how to find the tool with search_tools, one real call per family and an index of every guide.
- Chile public holidays API: 2026 holidays, business days and RUT — National, regional and local holidays with no key, curl and Python examples, and MCP usage.
- Chile communes API: regions, provinces and CUT codes — all 346 communes with CUT codes, region filters, name search, curl, Python and JavaScript examples, and MCP usage.
- Chile RUT validation API: check digit as JSON — the modulo 11 algorithm, accepted formats, computing the check digit, batches and privacy, curl, Python and JavaScript examples, and MCP usage.
- Chile public procurement API: Mercado Público tenders and purchase orders — ChileCompra ticket, curl and Python examples, and MCP usage.
- Chile economic indicators API: UF, dollar, euro, CPI and TPM — One real call per indicator (UF, dollar, euro, UTM, CPI, TMC, TIP, TPM, Imacec, GDP, unemployment and real exchange rate), from the CMF or the Central Bank, with curl, Python, JavaScript and MCP.
- Chile UF API: the Unidad de Fomento value as JSON — today's UF, full month, next month's days already published, range or year, with CMF data and a Central Bank cross-check, curl, Python and JavaScript examples, and MCP usage.
- Chile USD/CLP exchange rate API: the observed dollar as JSON — today's rate, daily series by month, range or year and the warning for values published in advance, with CMF data, curl, Python and JavaScript examples, and MCP usage.
- Central Bank of Chile API: BDE series as JSON — dollar, UF, policy rate, CPI, Imacec, GDP, unemployment and any series by code, series search, curl, Python and JavaScript examples, and MCP usage.
- Chile CMF API: UF value, dollar, UTM and maximum conventional rate — the seven API CMF Bancos series with no API key to request, curl and Python examples, and MCP usage.
- Chile fuel prices API: gasoline 93, 95, 97, diesel and LPG from Bencina en Línea — CNE data with no sign-up, the cheapest by comuna or near a point, curl, Python and JavaScript examples, and MCP usage.
- Chilexpress API: coverage by comuna, shipping quotes and tracking — covered comunas and sectors with their code and no key, names that differ from the official ones, quotes and tracking with your free keys, and MCP usage.
- Chile earthquakes API: latest quake, magnitude, depth and alerts — Public-domain USGS data with Chile local time, no USGS key, curl and Python examples, and MCP usage.
- Chile Official Gazette API: laws, decrees and new companies — Laws, decrees, notices and company incorporations with CVE and official PDF, no key, curl and Python examples, and MCP usage.
- Chile electricity market API: marginal cost, generation and demand — Coordinador Eléctrico Nacional grid data with no user_key to request, curl and Python examples, and MCP usage.
- Colombia SECOP II API: public procurement contracts and processes — Open data from datos.gov.co with no key, curl and Python examples, and MCP usage.
- Colombia TRM API: today's TRM and the COP/USD rate — Superintendencia Financiera data via datos.gov.co with no key, curl and Python examples, and MCP usage.
- Peru BCRP API: exchange rate, inflation and rates — BCRPData series with no key, curl and Python examples, and MCP usage.
- Banxico API: Mexico's FIX exchange rate, UDIS and TIIE — Banco de México SIE indicators with no token to request, curl and Python examples, and MCP usage.
This guide is also available en español.