mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-08 15:49:28 +00:00
possible fix for kw 1 issue
This commit is contained in:
@@ -13,7 +13,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return this.focusDate.format({ year: 'numeric' }) + ' KW ' + this.focusDate.w;
|
||||
return this.focusDate.wYear + ' KW ' + this.focusDate.w;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -12,7 +12,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return this.focusDate.format({year: 'numeric'}) + ' KW ' + this.focusDate.w;
|
||||
return this.focusDate.wYear + ' KW ' + this.focusDate.w;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -49,6 +49,12 @@ class CalendarDate {
|
||||
}
|
||||
}
|
||||
}
|
||||
get wYear() {
|
||||
if( this.w === 1 ) {
|
||||
return this.cdLastDayOfWeek.format({ year: 'numeric' });
|
||||
}
|
||||
return this.cdFirstDayOfWeek.format({ year: 'numeric' });
|
||||
}
|
||||
get wd() {
|
||||
if (this._wd === null) {
|
||||
this._wd = ((new Date(this.y, this.m, this.d)).getDay()+7-this.weekStart)%7;
|
||||
|
||||
Reference in New Issue
Block a user