Skip to content

Commit

Permalink
Use first of month for prev/next calculation (#9197)
Browse files Browse the repository at this point in the history
  • Loading branch information
andig authored Aug 1, 2023
1 parent 72befff commit eb60a4a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions assets/js/views/ChargingSessions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ export default {
},
headline() {
const date = new Date();
date.setMonth(this.month - 1);
date.setMonth(this.month - 1, 1);
date.setFullYear(this.year);
return this.fmtMonthYear(date);
},
Expand All @@ -497,7 +497,7 @@ export default {
prevDate() {
const date = new Date();
date.setFullYear(this.year);
date.setMonth(this.month - 2);
date.setMonth(this.month - 2, 1);
return date;
},
prevYearMonth() {
Expand All @@ -512,7 +512,7 @@ export default {
nextDate() {
const date = new Date();
date.setFullYear(this.year);
date.setMonth(this.month);
date.setMonth(this.month, 1);
return date;
},
nextYearMonth() {
Expand Down

0 comments on commit eb60a4a

Please sign in to comment.