From c6b3f66f4b672ace094728b0d4f4b043faf785e4 Mon Sep 17 00:00:00 2001 From: Ekaitz Date: Mon, 30 Jan 2023 11:54:33 +0100 Subject: Adjust date format to locale --- js/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'js') diff --git a/js/index.js b/js/index.js index 5d34903..0a41bf0 100644 --- a/js/index.js +++ b/js/index.js @@ -1,4 +1,7 @@ "use strict"; +const DATE_FORMAT = { + weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' +}; const LATITUDE = 43.26271; const LONGITUDE = -2.92528; const TIMEZONE = "Europe/Madrid"; @@ -76,7 +79,7 @@ function makeDay(date, t_max, t_min, weather){ day_element.setAttribute("class", "day-forecast"); day_element.innerHTML = `
-

+

${weather_desc}