UNPKG

degachejs

Version:

A Tunisian utility library for working with CIN, phone numbers, addresses, and more

23 lines (22 loc) 594 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.LOCALE = exports.formatDate = void 0; /** * Formats a date according to Tunisian locale * @param date - The date to format * @param options - Intl.DateTimeFormat options * @returns formatted date string */ const formatDate = (date, options = { year: "numeric", month: "long", day: "numeric", }) => { const formatter = new Intl.DateTimeFormat(exports.LOCALE, options); return formatter.format(date); }; exports.formatDate = formatDate; /** * Date locale */ exports.LOCALE = "ar-TN";