overleaf/services/web/frontend/js/shared/utils/formatDate.js

10 lines
185 B
JavaScript
Raw Normal View History

import moment from 'moment'
export function formatUtcDate(date) {
if (date) {
return moment(date).utc().format('D MMM YYYY, HH:mm:ss') + ' UTC'
} else {
return 'N/A'
}
}