mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 20:18:08 +00:00
[Enhancement] Group widget messages by date (#363)
* [Enhancement] Group widget messages by date * Update DateSeparator snapshot
This commit is contained in:
13
app/javascript/shared/helpers/DateHelper.js
Normal file
13
app/javascript/shared/helpers/DateHelper.js
Normal file
@@ -0,0 +1,13 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user