Add tests for web instance
This commit is contained in:
@@ -67,8 +67,8 @@
|
||||
//Compute registration date
|
||||
const diff = (Date.now()-(new Date(data.user.createdAt)).getTime())/(365*24*60*60*1000)
|
||||
const years = Math.floor(diff)
|
||||
const months = Math.ceil((diff-years)*12)
|
||||
computed.registration = years ? `${years} year${s(years)} ago` : `${months} month${s(months)} ago`
|
||||
const months = Math.floor((diff-years)*12)
|
||||
computed.registration = years ? `${years} year${s(years)} ago` : months ? `${months} month${s(months)} ago` : `${Math.ceil(diff*365)} day${s(Math.ceil(diff*365))} ago`
|
||||
computed.cakeday = [new Date(), new Date(data.user.createdAt)].map(date => date.toISOString().match(/(?<mmdd>\d{2}-\d{2})(?=T)/)?.groups?.mmdd).every((v, _, a) => v === a[0])
|
||||
|
||||
//Compute calendar
|
||||
|
||||
Reference in New Issue
Block a user