File tree 3 files changed +8
-4
lines changed
3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 45
45
"h3" : " ^1.7.1" ,
46
46
"highlight.js" : " ^11.8.0" ,
47
47
"js-base64" : " ^3.7.5" ,
48
+ "longevity-js" : " ^0.0.2" ,
48
49
"markdown-it" : " ^13.0.1" ,
49
50
"markdown-it-anchor" : " ^8.6.7" ,
50
51
"markdown-it-emoji" : " ^2.0.2" ,
Original file line number Diff line number Diff line change 76
76
77
77
<script lang="ts" setup>
78
78
import VueWriter from ' vue-writer'
79
+ import { calcAge } from ' longevity-js'
79
80
import { SOCIAL_LINKS } from ' @/config/links'
80
81
81
82
if (process .client ) {
@@ -113,8 +114,5 @@ onMounted(() => {
113
114
emailAddr .value = localStorage .getItem (' email' )
114
115
})
115
116
116
- const age = (
117
- (new Date ().getTime () - Date .parse (atob (' MjAwOC0xMC0xOQ==' ))) /
118
- (24 * 60 * 60 * 1000 * 365 )
119
- ).toFixed (2 )
117
+ const age = calcAge (new Date (' 2008-10-19T21:30:00.000+08:00' )).toFixed (2 )
120
118
</script >
Original file line number Diff line number Diff line change @@ -5593,6 +5593,11 @@ longest@^2.0.1:
5593
5593
resolved "https://registry.yarnpkg.com/longest/-/longest-2.0.1.tgz#781e183296aa94f6d4d916dc335d0d17aefa23f8"
5594
5594
integrity sha512-Ajzxb8CM6WAnFjgiloPsI3bF+WCxcvhdIG3KNA2KN962+tdBsHcuQ4k4qX/EcS/2CRkcc0iAkR956Nib6aXU/Q==
5595
5595
5596
+ longevity-js@^0.0.2 :
5597
+ version "0.0.2"
5598
+ resolved "https://registry.yarnpkg.com/longevity-js/-/longevity-js-0.0.2.tgz#faa6facce92ba04f17192defd49341ad203e63c1"
5599
+ integrity sha512-eh2DVJbOOp3ZvGAsdePC4JTZyrAKuWo1DIpBnfvY7rtMxU0yxYd2rZouU6y5lUHkQHIG9cMNphsjkAeeUsFixg==
5600
+
5596
5601
lru-cache@^10.0.1, lru-cache@^10.2.0, "lru-cache@^9.1.1 || ^10.0.0" :
5597
5602
version "10.2.0"
5598
5603
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.2.0.tgz#0bd445ca57363465900f4d1f9bd8db343a4d95c3"
You can’t perform that action at this time.
0 commit comments