import Immutable from "immutable" ; import moment from "moment" ; export default Immutable . Map ( { date : function ( time , format ) { return moment ( time ) . format ( format ) ; } , dateFromNow : function ( time ) { return moment ( time ) . fromNow ( ) ; } , } ) ;