Dates in America/Santiago
Servers run in UTC; your users are in Chile. These helpers always format in America/Santiago (daylight saving included), and build every string from fixed es-CL tables, so the server-rendered HTML and the browser produce the same bytes: no hydration mismatch. Intl is only used to convert the instant to Santiago's calendar fields.
import { chileToday, formatChileDate, formatChileDateTime, formatChileTime, toChileISODate } from "chile-kit/date";
const at = "2026-12-05T02:30:00Z"; // 23:30 on Dec 4 in Santiago
formatChileDate(at); // "04-12-2026"
formatChileDate(at, "medium"); // "4 dic 2026"
formatChileDate(at, "long"); // "4 de diciembre de 2026"
formatChileDate(at, "full"); // "viernes, 4 de diciembre de 2026"
formatChileTime(at); // "23:30"
formatChileDateTime(at, "long"); // "4 de diciembre de 2026, 23:30"
toChileISODate(at); // "2026-12-04"
chileToday(); // today's date in Chile, wherever the code runs
Inputs can be a Date, epoch milliseconds or an ISO string; invalid or nullish input returns "". A date-only string ("2026-12-04") is a Chilean calendar date, midnight in Santiago, so it never shifts to the previous day.