import moment from 'moment' ; export function format ( date , format ) { return moment ( date ) . format ( format ) ; } export function fromNow ( date ) { return moment ( date ) . fromNow ( ) ; } const dateService = { format , fromNow , } ; export default dateService ;