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).

RuleDoes Saturday count?How to compute it
Ley 19.880, art. 25 (administrative procedure)No: Saturdays, Sundays and holidays are non-business dayssumar_dias_habiles (default)
Code of Civil Procedure, arts. 59 and 66Yes: “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
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.

json
{
  "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:

python
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):

output
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-23

In 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:

javascript
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:

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 Santo

Step 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):

PeriodCalendar daysBusiness days (Mon–Fri)Business days incl. Saturday
5 daysWed 9 Dec 2026Mon 14 Dec 2026Fri 11 Dec 2026
10 daysMon 14 Dec 2026Mon 21 Dec 2026Thu 17 Dec 2026
15 daysSat 19 Dec 2026Tue 29 Dec 2026Wed 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:

MonthDaysBusiness days (Mon–Fri)Business days incl. Saturday
January312025
February282024
March312225
April302226
May312024
June302024
July312126
August312226
September302225
October312025
November302125
December312225
2027 total365252300

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”). If startDate is a holiday nothing changes: from Friday 25 December 2026, 1 business day is Monday 28 December 2026.
  • With businessDays 0 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 in holidays.
  • 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": true it 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 returns isBusinessDay for 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.

Cursor · mcp.json
{
  "mcpServers": {
    "better-llama": {
      "url": "https://mcp.betterllama.com/mcp"
    }
  }
}
Claude Code
claude mcp add --transport http better-llama https://mcp.betterllama.com/mcp

Setup 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

Other guides

This guide is also available en español.