This is my route through which I am making a ajax request for weather api,and in return getting a json response.In the json response there is a key 'dt' which is in unix format. So I want to get the day by converting this unix date and display it on my template.Please help.... Thanks in advance.
App.WeatherRoute = Ember.Route.extend({
model: function() {
var weather=[]
Ember.$.ajax({
async:false,
url:"http://api.openweathermap.org/data/2.5/forecast/daily?q=Pune&mode=json&units=metric&cnt=7",
success:function(data){
weather.push(data.list);
}
})
return weather;
}
});