var NzbDroneCell = require('../../Cells/NzbDroneCell'); var moment = require('moment'); var UiSettingsModel = require('../../Shared/UiSettingsModel'); var FormatHelpers = require('../../Shared/FormatHelpers'); module.exports = NzbDroneCell.extend({ className : 'timeleft-cell', render : function() { this.$el.empty(); if (this.cellValue) { if (this.cellValue.get('status').toLowerCase() === 'pending') { var ect = this.cellValue.get('estimatedCompletionTime'); var time = '{0} at {1}'.format(FormatHelpers.relativeDate(ect), moment(ect).format(UiSettingsModel.time(true, false))); this.$el.html('