Преглед на файлове

Update the date issues.

Lee Morgan преди 6 месеца
родител
ревизия
8dd341e0f4
променени са 2 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 0 0
      index.html
  2. 2 1
      index.js

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
index.html


+ 2 - 1
index.js

@@ -18,7 +18,8 @@ const renderForecast = (f)=>{
     const tbody = document.getElementById("forecastBody");
 
     for(let i = 0; i < f.length; i++){
-        let date = new Date(f[i].date);
+        const [y, m, d] = f[i].date.split("-").map(Number);
+        const date = new Date(y, m-1, d);
         head.children[i+1].textContent = date.toLocaleDateString("en-US", {
             month: "short",
             day: "numeric",

Някои файлове не бяха показани, защото твърде много файлове са промени