Turkish business-day math: religious holidays move every year, and half-days change the answer
Adding "5 business days" in Türkiye is not fixed-offset — religious holidays shift ~10 days a year and arife half-days can move an SLA deadline by a day. One call, holidays it skipped listed out.
"Add 5 business days" sounds like a fixed rule you could hardcode once. In Türkiye it is not: on top of weekends there are fixed national holidays (New Year, 23 April, 1 May, 19 May, 30 August, 29 October) and religious holidays (Ramazan Bayramı, Kurban Bayramı) whose Gregorian dates shift roughly 10–11 days earlier every year because they follow the lunar Hijri calendar. A deadline calculator that only knows about weekends will hand back a wrong date every time a religious holiday falls inside the window — which, over a year, is more often than it sounds.
Counting business days between two dates
curl "https://api.temsor.com/v1/tr/business-days?start=2026-03-15&end=2026-03-25"
{
"mode": "count",
"start": "2026-03-15",
"end": "2026-03-25",
"businessDays": 7,
"holidaysInRange": [
{ "date": "2026-03-19", "name": "Ramazan Bayramı Arifesi", "type": "dini", "half": true, "confirmed": true },
{ "date": "2026-03-20", "name": "Ramazan Bayramı 1. Gün", "type": "dini", "half": false, "confirmed": true },
{ "date": "2026-03-21", "name": "Ramazan Bayramı 2. Gün", "type": "dini", "half": false, "confirmed": true },
{ "date": "2026-03-22", "name": "Ramazan Bayramı 3. Gün", "type": "dini", "half": false, "confirmed": true }
]
}
holidaysInRange is what turns this from a black-box number into something you can put in
front of a customer or an auditor: every non-working day the count skipped over is named, dated and typed
(resmi for a fixed national holiday, dini for a religious one calculated from the
Hijri calendar).
The arife (half-day) decision changes the actual deadline
The day before a religious holiday (arife) is a half working day by law — offices close at noon. Whether that half-day counts as a full business day for your SLA is a real business decision, and the endpoint lets you make it explicitly rather than baking one answer in:
curl "https://api.temsor.com/v1/tr/business-days?start=2026-05-22&addDays=5"
{ "mode": "add", "start": "2026-05-22", "businessDays": 5, "resultDate": "2026-06-03",
"holidaysInRange": [
{ "date": "2026-05-26", "name": "Kurban Bayramı Arifesi", "type": "dini", "half": true, "confirmed": true },
{ "date": "2026-05-27", "name": "Kurban Bayramı 1. Gün", "type": "dini", "half": false, "confirmed": true },
{ "date": "2026-05-30", "name": "Kurban Bayramı 4. Gün", "type": "dini", "half": false, "confirmed": true }
] }
curl "https://api.temsor.com/v1/tr/business-days?start=2026-05-22&addDays=5&countHalfDaysAsWork=false"
{ "mode": "add", "start": "2026-05-22", "businessDays": 5, "resultDate": "2026-06-04" }
Same start date, same 5 business days requested — the deadline lands on 2026-06-03 if the arife half-day counts as work, or one day later, 2026-06-04, if it does not. That single flag is a real one-day swing on a payment term or SLA, and it is exactly the kind of discrepancy that surfaces as a dispute months later if two systems in the same company assume different defaults.
Both modes: count between dates, or add/subtract from a date
start+end→mode: "count", returns the number of business days in the (inclusive) range.start+addDays→mode: "add", returnsresultDateafter walking forward (or backward, with a negative value) that many business days fromstart. One ofaddDaysorendis required — supplying neither is a validation error, not a silent default.
Fixed vs. religious holidays, side by side
curl "https://api.temsor.com/v1/tr/business-days?start=2026-05-01&end=2026-06-15"
{ "businessDays": 27,
"holidaysInRange": [
{ "date": "2026-05-01", "name": "Emek ve Dayanışma Günü", "type": "resmi", "half": false, "confirmed": true },
{ "date": "2026-05-19", "name": "Atatürk'ü Anma, Gençlik ve Spor Bayramı", "type": "resmi", "half": false, "confirmed": true },
{ "date": "2026-05-26", "name": "Kurban Bayramı Arifesi", "type": "dini", "half": true, "confirmed": true },
{ "date": "2026-05-27", "name": "Kurban Bayramı 1. Gün", "type": "dini", "half": false, "confirmed": true }
] }
type: "resmi" holidays land on the same calendar date every year and rarely change. Every
type: "dini" entry moves roughly 10–11 days earlier each year against the Gregorian calendar,
which is exactly why hardcoding "Kurban Bayramı is around late June" breaks two years later. Religious
holiday dates are also only finalised close to the day (the Presidency of Religious Affairs, Diyanet,
confirms the exact day nearer the date); confirmed is there to distinguish an
already-finalised date from one that is still a forward calculation.
Vade / SLA calculation, in code
import Client from 'temsor-api';
const api = new Client();
async function paymentDueDate(invoiceDate, termDays) {
const r = await api.trBusinessDays({ start: invoiceDate, addDays: termDays });
return {
dueDate: r.resultDate,
skipped: r.holidaysInRange.map((h) => `${h.date} (${h.name})`),
};
}
What is not covered
This calculates statutory Turkish holidays and weekends — it does not know about a specific company's extra closure days (a bridge day the employer granted, a local closure), which have to be layered on by the caller if they apply.
Frequently asked
Why do religious holiday dates change every year?
Ramazan Bayramı and Kurban Bayramı follow the Hijri lunar calendar, which is about 10–11 days shorter than the Gregorian year, so their Gregorian dates drift earlier each year. This endpoint calculates them rather than using a fixed yearly table, so the shift is handled automatically.
What is arife and why does it matter for a deadline?
Arife is the half working day before a religious holiday — offices close at noon by custom/regulation. Whether that half-day counts as a full business day is set with countHalfDaysAsWork (default true), and it can shift a computed deadline by a day depending on which way you set it.
What is the difference between type "resmi" and "dini" in holidaysInRange?
"resmi" is a fixed national holiday that falls on the same calendar date every year. "dini" is a religious holiday calculated from the Hijri calendar, so its Gregorian date moves year to year.
Does this account for company-specific closure days?
No — it covers statutory national and religious holidays and weekends only. Extra closures a specific employer grants (e.g. a bridge day) are not in this calculation and need to be added by the caller.