Commit 6c3117cd861056f4d527e117dc54fe573261a9da
today compare
nomand committed on 6/4/2018, 10:46:24 PMParent: b8017e7d4e7bfe88c7a57781f6d7485d56855594
Files changed
js/letnice.js | changed |
js/letnice.js | ||
---|---|---|
@@ -45,8 +45,9 @@ | ||
45 | 45 | monthLength = new Date(year, month+1, 0).getDate(); |
46 | 46 | let date = 0; |
47 | 47 | let x = 0; |
48 | 48 | let y = 0; |
49 | + let today = new Date(year, new Date().getMonth(), new Date().getDate(), 0); | |
49 | 50 | |
50 | 51 | while(date < monthLength) |
51 | 52 | { |
52 | 53 | x += 14; |
@@ -61,9 +62,9 @@ | ||
61 | 62 | { |
62 | 63 | style = "null"; |
63 | 64 | date-- |
64 | 65 | } |
65 | - else if(day < new Date(year, new Date().getMonth(), new Date().getDate(), 0)) | |
66 | + else if(day < today) | |
66 | 67 | { |
67 | 68 | style = "gone"; |
68 | 69 | } |
69 | 70 | else if(day.getDay() == 5 || day.getDay() == 6) |
Built with git-ssb-web