Dates use AirTime and UtcOffset when displaying

This commit is contained in:
Mark McDowall
2013-02-13 21:56:06 -06:00
committed by kay.one
parent 5930a15d3a
commit a04695a3e7
5 changed files with 35 additions and 2 deletions
@@ -4,7 +4,7 @@
<td name="qualityProfileName"></td>
<td name="network"></td>
<!-- If only DT could access the backbone model -->
<td><span data-date="{{nextAiring}}">{{bestDateString}}</span></td>
<td><span title="{{formatedDateString}}" data-date="{{nextAiring}}">{{bestDateString}}</span></td>
<td>
<div class="progress">
<span class="progressbar-back-text">{{episodeFileCount}} / {{episodeCount}}</span>
@@ -18,6 +18,16 @@
return date.format('{MM}/{dd}/{yyyy}');
},
formatedDateString: function () {
var dateSource = this.get('nextAiring');
if (!dateSource) return '';
var date = Date.create(dateSource);
return date.format('{Weekday} {Month} {dd}, {yyyy} {12hr}:{mm} {TT}');
},
percentOfEpisodes: function () {
var episodeCount = this.get('episodeCount');
var episodeFileCount = this.get('episodeFileCount');