diff options
| author | marcin mikołajczak <git@mkljczk.pl> | 2022-02-13 19:07:49 +0100 |
|---|---|---|
| committer | marcin mikołajczak <git@mkljczk.pl> | 2022-02-13 19:11:14 +0100 |
| commit | 79d02bddbe2b77574844b8ade7a09043c31b1c6b (patch) | |
| tree | 7a8904bbf031ea8618eb7320d9129a13b1b181c0 /src/components/user_profile/user_profile.js | |
| parent | 8ade11783aa4740a2cff61f27938f3408c3e0eb0 (diff) | |
Birthdays
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
Diffstat (limited to 'src/components/user_profile/user_profile.js')
| -rw-r--r-- | src/components/user_profile/user_profile.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/components/user_profile/user_profile.js b/src/components/user_profile/user_profile.js index 7a475609..05d5f0a6 100644 --- a/src/components/user_profile/user_profile.js +++ b/src/components/user_profile/user_profile.js @@ -7,13 +7,16 @@ import TabSwitcher from 'src/components/tab_switcher/tab_switcher.js' import RichContent from 'src/components/rich_content/rich_content.jsx' import List from '../list/list.vue' import withLoadMore from '../../hocs/with_load_more/with_load_more' +import localeService from 'src/services/locale/locale.service.js' import { library } from '@fortawesome/fontawesome-svg-core' import { - faCircleNotch + faCircleNotch, + faBirthdayCake } from '@fortawesome/free-solid-svg-icons' library.add( - faCircleNotch + faCircleNotch, + faBirthdayCake ) const FollowerList = withLoadMore({ @@ -75,6 +78,10 @@ const UserProfile = { }, followersTabVisible () { return this.isUs || !this.user.hide_followers + }, + formattedBirthday () { + const browserLocale = localeService.internalToBrowserLocale(this.$i18n.locale) + return this.user.birthday && new Date(Date.parse(this.user.birthday)).toLocaleDateString(browserLocale, { timeZone: 'UTC', day: 'numeric', month: 'long', year: 'numeric' }) } }, methods: { |
