(function ($, document, apiClient) { var currentItem; var programs; function cancelRecording(page, id) { } function scheduleRecording(page, id) { } function renderPrograms(page, result) { var html = ''; var currentIndexValue; for (var i = 0, length = result.Items.length; i < length; i++) { var program = result.Items[i]; var startDate = program.StartDate; var startDateText = ''; try { startDate = parseISO8601Date(startDate, { toLocal: true }); startDateText = LibraryBrowser.getFutureDateText(startDate); } catch (err) { } if (startDateText != currentIndexValue) { html += '