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