14 lines
228 B
JavaScript
14 lines
228 B
JavaScript
|
import moment from 'moment';
|
||
|
|
||
|
class DateHelper {
|
||
|
constructor(date) {
|
||
|
this.date = moment(date * 1000);
|
||
|
}
|
||
|
|
||
|
format(dateFormat = 'MMM DD, YYYY') {
|
||
|
return this.date.format(dateFormat);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export default DateHelper;
|