From 415fd88bf403f172d64bae7bcc3ed5ebef2bc7e3 Mon Sep 17 00:00:00 2001 From: lowlighter <22963968+lowlighter@users.noreply.github.com> Date: Fri, 12 Mar 2021 12:16:44 +0100 Subject: [PATCH] Update index.mjs --- source/plugins/core/index.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/source/plugins/core/index.mjs b/source/plugins/core/index.mjs index 720b555b..02a0fd59 100644 --- a/source/plugins/core/index.mjs +++ b/source/plugins/core/index.mjs @@ -81,6 +81,7 @@ const diff = (Date.now()-(new Date(data.user.createdAt)).getTime())/(365*24*60*60*1000) const years = Math.floor(diff) const months = Math.floor((diff-years)*12) + computed.registered = {years, months, diff} computed.registration = years ? `${years} year${imports.s(years)} ago` : months ? `${months} month${imports.s(months)} ago` : `${Math.ceil(diff*365)} day${imports.s(Math.ceil(diff*365))} ago` computed.cakeday = years > 1 ? [new Date(), new Date(data.user.createdAt)].map(date => date.toISOString().match(/(?\d{2}-\d{2})(?=T)/)?.groups?.mmdd).every((v, _, a) => v === a[0]) : false