asp-antd-compatible
Version:
An enterprise-class UI design language and React components implementation
19 lines (15 loc) • 336 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.formatDate = formatDate;
// eslint-disable-next-line import/prefer-default-export
function formatDate(value, format) {
if (!value) {
return '';
}
if (Array.isArray(format)) {
format = format[0];
}
return value.format(format);
}