From b88446887a2a238bdf50acf56602c37ffdce83f9 Mon Sep 17 00:00:00 2001 From: Noah Loomans Date: Thu, 22 Sep 2016 15:39:32 +0200 Subject: Fixed iOS --- public/javascripts/getWeek.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'public/javascripts/getWeek.js') 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 -- cgit v1.1