mirror of
https://github.com/skidoodle/albert.lol.git
synced 2025-02-15 06:09:15 +01:00
.add age function
This commit is contained in:
parent
56e6282f68
commit
75025a11f3
1 changed files with 6 additions and 0 deletions
6
src/utils/age.ts
Normal file
6
src/utils/age.ts
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
export default function age () {
|
||||||
|
return Math.floor(
|
||||||
|
(new Date().getTime() - new Date('2004-07-22').getTime()) /
|
||||||
|
(1000 * 60 * 60 * 24 * 365.25),
|
||||||
|
);
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue