From 6af87eef2282eda2d4e9b36a15ccaced6204effc Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 23 Jan 2017 15:18:45 +0900 Subject: [PATCH] [Client] Display age --- package.json | 1 + src/web/app/desktop/tags/user-profile.tag | 4 +++- src/web/app/mobile/tags/user.tag | 4 +++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 5181b12f0..3fd0ae123 100644 --- a/package.json +++ b/package.json @@ -135,6 +135,7 @@ "riot-compiler": "3.1.1", "riotify": "2.0.0", "rndstr": "1.0.0", + "s-age": "1.1.0", "serve-favicon": "2.3.2", "shelljs": "0.7.6", "subdomain": "1.2.0", diff --git a/src/web/app/desktop/tags/user-profile.tag b/src/web/app/desktop/tags/user-profile.tag index 12101ed63..710da1402 100644 --- a/src/web/app/desktop/tags/user-profile.tag +++ b/src/web/app/desktop/tags/user-profile.tag @@ -5,7 +5,7 @@
{ user.bio }
-

{ user.birthday.replace('-', '年').replace('-', '月') + '日' }

+

{ user.birthday.replace('-', '年').replace('-', '月') + '日' } ({ age(user.birthday) }歳)

@{ user.twitter.screen_name }

@@ -80,6 +80,8 @@