A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
fix timeSince function
ammarahm-ed15d28bf6fbcf
diff --git a/apps/mobile/src/utils/utils.js b/apps/mobile/src/utils/utils.jsindex 617140787..6eb5b29dc 100755--- a/apps/mobile/src/utils/utils.js+++ b/apps/mobile/src/utils/utils.js@@ -14,23 +14,23 @@ export function timeSince(date) {var interval = Math.floor(seconds / 31536000);- if (interval > 1) {+ if (interval > 0.9) {return interval < 2 ? interval + ' year ago' : interval + ' years ago';}interval = Math.floor(seconds / 2592000);- if (interval > 1) {+ if (interval > 0.9) {return interval < 2 ? interval + ' month ago' : interval + ' months ago';}interval = Math.floor(seconds / 86400);- if (interval > 1) {+ if (interval > 0.9) {return interval < 2 ? interval + ' day ago' : interval + ' days ago';}interval = Math.floor(seconds / 3600);- if (interval > 1) {+ if (interval > 0.9) {return interval < 2 ? interval + ' hour ago' : interval + ' hours ago';}interval = Math.floor(seconds / 60);- if (interval > 1) {+ if (interval > 0.9) {return interval < 2 ? interval + ' min ago' : interval + ' min ago';}return Math.floor(seconds) + ' secs ago';