Skip to content

Instantly share code, notes, and snippets.

@nanotroy
Created August 28, 2019 15:51
Show Gist options
  • Save nanotroy/842cd0ab2836b4aabe24d6fb8d71d2d1 to your computer and use it in GitHub Desktop.
Save nanotroy/842cd0ab2836b4aabe24d6fb8d71d2d1 to your computer and use it in GitHub Desktop.
import * as moment from 'moment';
export const formatDate = (date) => {
if (date) {
return moment(date).format('YYYY-MM-DD hh:mm A');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment