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) {
|
2013-07-24 05:28:06 +00:00
|
|
|
|
var date = new Date(model.get('airDateUtc'));
|
2013-06-24 23:41:59 +00:00
|
|
|
|
var time = date.getTime();
|
|
|
|
|
return time;
|
|
|
|
|
}
|
|
|
|
|
});
|
2013-02-23 17:42:15 +00:00
|
|
|
|
});
|