Business-day deadline
Compute a due date in business days in Senegal with /v1/delais, and count the business days of a period with /v1/jours-feries/ouvres.
Goal: show a correct delivery, refund or reply date, without forgetting weekends or public holidays.
For the API, a business day runs Monday to Friday and is not a public holiday
of the Public holidays dataset. Dates use the
YYYY-MM-DD format. Senegal is on GMT all year.
Add N business days
GET /v1/delais?from=2026-10-01&days=10
{ "from": "2026-10-01", "days": 10, "date": "2026-10-15", "holidays": [], "warnings": [] }from: start date, not counted.days: integer from 0 to 3,650.date: the due date.holidays: the public holidays skipped.warnings: what makes the result uncertain (in French).
Read the warnings
Muslim holidays depend on moon sighting. Their dates are forecasts until the official announcement.
GET /v1/delais?from=2026-03-16&days=5
{
"from": "2026-03-16", "days": 5, "date": "2026-03-24",
"holidays": ["2026-03-20"],
"warnings": ["2026-03-20 (Korité (Aïd el-Fitr)) est une date prévisionnelle."]
}The dataset covers 2026 and 2027. Beyond that, only weekends are excluded:
GET /v1/delais?from=2027-12-20&days=15
{
"from": "2027-12-20", "days": 15, "date": "2028-01-10",
"holidays": [],
"warnings": ["Aucun jour férié connu pour 2028 : seuls les week-ends sont exclus."]
}Show the warning to the user, for example "estimated date". Do not promise a firm date that depends on a lunar holiday.
Count the business days of a period
GET /v1/jours-feries/ouvres?from=2026-12-01&to=2026-12-31 (both ends included)
{ "from": "2026-12-01", "to": "2026-12-31", "business_days": 22, "holidays": ["2026-12-25"], "warnings": [] }The range is limited to 10 years. If to is before from, the API returns
400 INVALID_RANGE. An invalid date returns 400 INVALID_DATE.
Code
const API = process.env.API_URL ?? 'http://localhost:8787';
export async function dueDate(start, days) {
const res = await fetch(`${API}/v1/delais?from=${start}&days=${days}`);
const body = await res.json();
if (!res.ok) throw new Error(body.message);
return { date: body.date, estimated: body.warnings.length > 0, warnings: body.warnings };
}
// await dueDate('2026-10-01', 10) → { date: '2026-10-15', estimated: false, warnings: [] }The responses on this page were obtained from the local API on 28 September 2026.
What next?
Map of communes
Download the hub's geographic reference, list the 553 communes with their population, and place them on a map from the available centroids.
Sign-up form
Validate a Senegalese phone number with /v1/telephone/analyse and offer a cascading region, department and commune choice with /v1/geographie.