@selfcommunity/react-ui
Version:
React UI Components to integrate a Community created with SelfCommunity Platform.
16 lines (15 loc) • 574 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.formatDateForGC = exports.checkEventFinished = void 0;
function checkEventFinished(event) {
if (event && !event.running) {
return new Date().getTime() > new Date(event.end_date || event.start_date).getTime();
}
return false;
}
exports.checkEventFinished = checkEventFinished;
function formatDateForGC(eventDate) {
const date = new Date(eventDate);
return date.toISOString().replace(/[-:]/g, '').split('.')[0] + 'Z';
}
exports.formatDateForGC = formatDateForGC;
;