sonarr-repo-only/UI/Calendar/Collection.js

18 lines
466 B
JavaScript
Raw Normal View History

'use strict';
define(
[
'backbone',
'Series/EpisodeModel'
], function (Backbone, EpisodeModel) {
return Backbone.Collection.extend({
url : window.ApiRoot + '/calendar',
model: EpisodeModel,
comparator: function (model) {
2013-07-24 05:28:06 +00:00
var date = new Date(model.get('airDateUtc'));
var time = date.getTime();
return time;
}
});
});