mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-26 06:23:35 -04:00
fix(timesheets): Make the ranges always the end of the months using Luxon's endOf
function
This commit is contained in:
parent
6f2b085f47
commit
347d0a0dc7
@ -101,7 +101,9 @@ export default {
|
|||||||
},
|
},
|
||||||
isInRange(year, month) {
|
isInRange(year, month) {
|
||||||
const x = DateTime.local(year, month, 15);
|
const x = DateTime.local(year, month, 15);
|
||||||
return x >= DateTime.local(this.startYear, this.startMonth, 1) && x <= DateTime.local(this.endYear, this.endMonth, 30);
|
const begin = DateTime.local(this.startYear, this.startMonth, 1).startOf('month');
|
||||||
|
const end = DateTime.local(this.endYear, this.endMonth, 1).endOf('month');
|
||||||
|
return x.ts >= begin.ts && x.ts <= end.ts;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user