2013-06-24 23:41:59 +00:00
|
|
|
|
'use strict';
|
|
|
|
|
define(
|
|
|
|
|
[
|
|
|
|
|
'backbone',
|
|
|
|
|
'Series/EpisodeModel'
|
|
|
|
|
], function (Backbone, EpisodeModel) {
|
|
|
|
|
return Backbone.Collection.extend({
|
|
|
|
|
url : window.ApiRoot + '/calendar',
|
|
|
|
|
model: EpisodeModel,
|
2013-06-06 03:03:04 +00:00
|
|
|
|
|
2013-06-24 23:41:59 +00:00
|
|
|
|
comparator: function (model) {
|
|
|
|
|
var date = new Date(model.get('airDate'));
|
|
|
|
|
var time = date.getTime();
|
|
|
|
|
return time;
|
|
|
|
|
}
|
|
|
|
|
});
|
2013-02-23 17:42:15 +00:00
|
|
|
|
});
|