@ozen-ui/kit
Version:
React component library
14 lines (13 loc) • 555 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.formatDateToString = void 0;
var formatDateToString = function (date) {
if (!date) {
return '';
}
var year = new Intl.DateTimeFormat('en', { year: 'numeric' }).format(date);
var month = new Intl.DateTimeFormat('en', { month: '2-digit' }).format(date);
var day = new Intl.DateTimeFormat('en', { day: '2-digit' }).format(date);
return "".concat(day, ".").concat(month, ".").concat(year);
};
exports.formatDateToString = formatDateToString;
;