mirror of
https://github.com/MeiK2333/github-style.git
synced 2025-10-07 01:54:06 +00:00
bug fix
This commit is contained in:
@@ -29,8 +29,8 @@ function switchYear(year) {
|
||||
let startDate;
|
||||
let endDate;
|
||||
if (year != now.getFullYear().toString()) {
|
||||
const date = new Date(year);
|
||||
startDate = new Date(date.getTime() - date.getDay() * 24 * 60 * 60 * 1000);
|
||||
const date = new Date(`${year}-01-01 00:00:00`);
|
||||
startDate = new Date(date.getFullYear(), 0, 1);
|
||||
endDate = new Date(date.getFullYear(), 11, 31);
|
||||
} else {
|
||||
endDate = now;
|
||||
|
Reference in New Issue
Block a user