aboutsummaryrefslogtreecommitdiff
path: root/src/components/user_profile/user_profile.js
diff options
context:
space:
mode:
authorHJ <30-hj@users.noreply.git.pleroma.social>2023-01-25 23:50:54 +0000
committerHJ <30-hj@users.noreply.git.pleroma.social>2023-01-25 23:50:54 +0000
commit22c3012e1cb66b8a93b79b2bf3d655394aacee5b (patch)
tree026f8c2c0416acfcb317b58e888cd54cb6108783 /src/components/user_profile/user_profile.js
parent65e10f07def87f0c4399dbce92eb00b430d5dba4 (diff)
parent03d5c2e140fc70937d3533665fa88d055ab486f1 (diff)
Merge branch 'birthdays' into 'develop'
Birthdays See merge request pleroma/pleroma-fe!1432
Diffstat (limited to 'src/components/user_profile/user_profile.js')
-rw-r--r--src/components/user_profile/user_profile.js11
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 08adaeab..acb612ed 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.jsx'
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({
@@ -76,6 +79,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: {