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