Skip to content
Snippets Groups Projects
Commit cb5e3edd authored by Sander August Heggland Schrader's avatar Sander August Heggland Schrader
Browse files

Changes

parent 3cfbfe92
No related branches found
No related tags found
1 merge request!119New chat2
......@@ -66,14 +66,7 @@ export default {
If message was sent this year show month and day of the month (MM DD) (Jan 13)
If message was sent more than a year ago show year with date (MMM DD YYYY) (Jan 13 2020)
*/
const date = new Date(this.message.timestamp);
const now = new Date();
const diff = now.getTime() - date.getTime();
const diffDays = Math.ceil(diff / (1000 * 3600 * 24));
const diffWeeks = Math.ceil(diff / (1000 * 3600 * 24 * 7));
const diffMonths = Math.ceil(diff / (1000 * 3600 * 24 * 30));
const diffYears = Math.ceil(diff / (1000 * 3600 * 24 * 365));
return "13:00"
},
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment