title: Convert Unix Timestamp to week day
body: <p>I know <a href="https://stackoverflow.com/questions/847185">here</a> is a similar question but I could not apply this to my code. Don't know where to put it and different result needed.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>success: function(data){
              
    var table = '';
    
    var header = '&lt;h2&gt;' + data.city.name + ', ' + data.city.country + '&lt;/h2&gt;'
    
    for(var i = 0; i &lt; data.list.length; i++){
        table += "&lt;tr&gt;";
        
        table += "&lt;td&gt;" + data.list[i].dt + "&lt;/td&gt;";
        table += "&lt;td&gt;&lt;img src='img/"+data.list[i].weather[0].description+".svg'&gt;&lt;/td&gt;";
        table += "&lt;td&gt;" +data.list[i].weather[0].description+ "&lt;/td&gt;";
        table += "&lt;td&gt;" + Math.round(data.list[i].temp.day) + "&amp;deg;&lt;/td&gt;";           
        
        table += "&lt;/tr&gt;";
    }
    
    $("#forecastWeather").html(table);
    $("#header").html(header);
    
    $("#city").val('');
    }
  });</code></pre>
  </div>
  </div>
  </p>
  
  <p>I am making a weather app using Open Weather Map Forecast 16. All works fine but I cant figure out how to convert the unix timestamp in my code to the day of the week. Here is the line in my JavaScript code where I add the date to the table:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>table += "&lt;td&gt;" + data.list[i].dt + "&lt;/td&gt;";</code></pre>
  </div>
  </div>
  </p>
  
  <p>This gives my number like: 1522666800. How do I get it to show a weekday?</p>