ForHosting KIT · Translation

Localize dates

03/04/2026 means March 4th to a reader in Chicago and April 3rd to a reader in São Paulo, and that single ambiguity has caused more shipped bugs than almost any other formatting decision. The Date Localization API takes a date value and a target locale and returns it written the way that locale unambiguously expects — day-month-year order, month names, separators and calendar conventions all handled correctly. It exists so your application never has to guess which reading is right.

● StableFree · in your browser
Use it from WebAPIEmailApp soonTelegram soon

Runs in your browser. Free, unlimited — your data never leaves this page.

The ambiguity that ships in production

Numeric date formats hide their own ambiguity: MM/DD/YYYY and DD/MM/YYYY look identical for any day number under 13, which means the bug only surfaces on the 13th of a month or later — often weeks after a feature ships and long after the demo where everything looked fine. Anyone shipping to more than one country runs into this exact failure mode, usually in a support ticket about a delivery date or a subscription renewal that seemed to happen on the wrong day.

What the endpoint returns

Send a date value and a target locale, and get back a correctly formatted string — the right element order, localized month and weekday names where relevant, the correct separator character, and locale-appropriate conventions like leading zeros or written-out versus abbreviated months. The output matches what a native reader of that locale would write by hand, not a generic ISO string reformatted with substitutions.

A convention with real history behind it

Date order isn't arbitrary — it reflects centuries of regional record-keeping habits, from the day-first tradition common across Europe and Latin America to the month-first convention that took hold in the United States through its own administrative history, alongside the year-first logic used in much of East Asia for sorting and record clarity. None of these are 'more correct'; they're just different conventions a formatting layer has to respect rather than override.

How it slots into a pipeline

The call is asynchronous: submit the date and locale, get a task_id immediately, and receive the formatted result through a signed webhook or a signed link valid for 24 hours. At $0.002 flat per request with no word-count component, it's built for high-frequency use across an entire application layer — every timestamp a user sees, formatted correctly without a client-side library making assumptions.

Where it matters most

Booking confirmations, invoice due dates, subscription renewal notices and any timestamp visible to an end user carry real consequences when misread — a missed renewal or a misunderstood delivery window erodes trust fast, and it does so silently, without a single word of the surrounding copy being wrong.

Booking and reservation confirmations

A travel platform serving customers in the US and Brazil formats the same underlying check-in date correctly for each, avoiding the classic day/month swap that causes missed check-ins.

Invoice and billing dates

A billing system renders due dates per the customer's locale so an invoice due '03/04' isn't misread as the wrong month by a third of its recipients.

Multi-region event listings

An events calendar syndicated across several countries shows each event's date and time formatted the way local readers expect, including localized weekday and month names.

Automated report generation

A nightly job formats every date field in a generated PDF or email report to match the recipient's locale before delivery, without a human touching the template per market.

What exactly does this API do?

It takes a date value and a target locale and returns the date formatted the way that locale expects — correct element order, separators and localized month or weekday names where applicable.

Does it fix the classic MM/DD vs DD/MM confusion?

Yes, that's the core problem it solves: you send an unambiguous date value and the target locale, and the returned string is formatted correctly for that locale rather than left open to misreading.

Is it free to use?

The tool above runs free in your browser. The API is paid — each call draws from your prepaid ForHosting KIT balance: top up from $10.00 (it never expires), pay each request's published price, and a call with no balance returns HTTP 402. No subscription, no tokens, and a failed task is never charged.

How much does it cost?

$0.002 per request, flat, since there's no text volume involved, and you're only billed for tasks that succeed.

Which locales does it support?

Standard locale codes such as en-US, es-MX, pt-BR, de-DE and ja-JP are supported, each applying that region's date order and naming conventions.

Can it format dates in bulk?

Yes, submit requests asynchronously and collect results via webhook, which works well for batch jobs like report generation or catalog syncs.

How do I receive the formatted date?

Through a signed webhook, recommended for automated systems, or a signed link valid for 24 hours if you prefer to retrieve it manually.

What happens if formatting fails?

The task retries automatically up to three times; if it still fails you get a clear error and are never charged for it.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/locale/format-date

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, and soon from our app, email and Telegram.

curl -X POST https://api.kit.forhosting.com/locale/format-date \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"items":["valor-1","valor-2"]}'
{
  "items": [
    "valor-1",
    "valor-2"
  ]
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "locale.format_date",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_tokens20000
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Read the full KIT documentation →