فهرست منبع

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",

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است