diff options
author | Noah Loomans <noahloomans@gmail.com> | 2016-09-22 15:39:32 +0200 |
---|---|---|
committer | Noah Loomans <noahloomans@gmail.com> | 2016-09-22 15:39:32 +0200 |
commit | b88446887a2a238bdf50acf56602c37ffdce83f9 (patch) | |
tree | 66c04a0dfb5e3af2ae0deff47ebdb4005adcd934 /public/javascripts/getWeek.js | |
parent | b6206ce765b4330ae6b17b1724f60115fc3807d8 (diff) |
Fixed iOS
Diffstat (limited to 'public/javascripts/getWeek.js')
-rw-r--r-- | public/javascripts/getWeek.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/public/javascripts/getWeek.js b/public/javascripts/getWeek.js index 5c82a27..40b0bb4 100644 --- a/public/javascripts/getWeek.js +++ b/public/javascripts/getWeek.js @@ -3,11 +3,11 @@ // week number. function getWeek () { // Create a copy of this date object - var target = new Date() + const target = new Date() // ISO week date weeks start on monday // so correct the day number - var dayNr = (target.getDay() + 6) % 7 + const dayNr = (target.getDay() + 6) % 7 // ISO 8601 states that week 1 is the week // with the first thursday of that year. @@ -15,7 +15,7 @@ function getWeek () { target.setDate(target.getDate() - dayNr + 3) // Store the millisecond value of the target date - var firstThursday = target.valueOf() + const firstThursday = target.valueOf() // Set the target to the first thursday of the year // First set the target to january first |