const moment = require('moment');

const formatTimestamp = (timestamp) => {
	if (moment(timestamp).isValid()) {
		return moment(timestamp).format('YYYY-MM-DD h:mm:ss a');
	}
	return null;
};

module.exports = formatTimestamp;
