@janus-idp/shared-react
Version:
Shared code for utils, types, and React components for the Janus frontend plugins.
15 lines (11 loc) • 352 B
JavaScript
;
var dateFns = require('date-fns');
function formatDate(date) {
if (!date || date === -1) {
return "N/A";
}
const adjustedDate = typeof date === "number" ? date * 1e3 : date;
return dateFns.format(new Date(adjustedDate), "LLL d, yyyy, h:mm a");
}
exports.formatDate = formatDate;
//# sourceMappingURL=format-date.cjs.js.map