Skip to content

Commit ede67f9

Browse files
author
Anthony Gore
committed
20
1 parent 86e4973 commit ede67f9

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/components/CurrentMonth.vue

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
<template>
2-
2+
<div>{{ formattedDate }}</div>
33
</template>
44
<script>
55
export default {
6-
6+
computed: {
7+
formattedDate() {
8+
return this.$moment(`${this.year}-${this.month}-1`, 'YYYY-M-D').format('MMMM YYYY');
9+
},
10+
month() {
11+
return this.$store.state.currentMonth;
12+
},
13+
year() {
14+
return this.$store.state.currentYear;
15+
},
16+
}
717
}
818
</script>

0 commit comments

Comments
 (0)