chore(ui): Move prettifyTimeDifference to helper as generatePrettyTimeDifference

This commit is contained in:
TwiN
2022-06-12 17:57:05 -04:00
parent c31cb7540d
commit 9f343bacf7
2 changed files with 5 additions and 5 deletions

View File

@ -17,6 +17,10 @@ export const helper = {
let seconds = (differenceInMs / 1000).toFixed(0);
return seconds + " second" + (seconds !== "1" ? "s" : "") + " ago";
},
generatePrettyTimeDifference(start, end) {
let minutes = Math.ceil((new Date(start) - new Date(end)) / 1000 / 60);
return minutes + (minutes === 1 ? ' minute' : ' minutes');
},
prettifyTimestamp(timestamp) {
let date = new Date(timestamp);
let YYYY = date.getFullYear();