Fix Localized Days in Your Stats page

This commit is contained in:
Tomazed 2023-01-24 19:19:42 +01:00
parent 4ae057f626
commit 5e943ef152
9 changed files with 42 additions and 9 deletions

View file

@ -27,7 +27,7 @@
<div class="absolute -bottom-2 left-0 flex ml-6">
<template v-for="dayObj in last7Days">
<div :key="dayObj.date" :style="{ width: daySpacing + daySpacing / 14 + 'px' }">
<p class="text-sm font-book">{{ dayObj.dayOfWeek.slice(0, 3) }}</p>
<p class="text-sm font-book">{{ dayObj.dayOfWeekAbbr }}</p>
</div>
</template>
</div>
@ -108,6 +108,7 @@ export default {
var _date = this.$addDaysToToday(i * -1)
days.push({
dayOfWeek: this.$formatJsDate(_date, 'EEEE'),
dayOfWeekAbbr: this.$strings[`Weekday${this.$formatJsDate(_date, 'EEE')}`],
date: this.$formatJsDate(_date, 'yyyy-MM-dd')
})
}
@ -218,4 +219,4 @@ export default {
},
mounted() {}
}
</script>
</script>