This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const useUpdatableTimestamp = (controller) => { | |
| return Object.assign(controller, { | |
| timeAgoInWordsWithParsing(from) { | |
| const date = new Date; | |
| date.setTime(Date.parse(from)); | |
| return this.timeAgoInWords(date); | |
| }, | |
| timeAgoInWords(from) { | |
| return this.distanceOfTimeInWords(new Date(), from); |