define(['datetime', 'tvguide'], function (datetime) { function renderPrograms(page, result) { var html = ''; var currentIndexValue; var now = new Date(); for (var i = 0, length = result.Items.length; i < length; i++) { var program = result.Items[i]; var startDate = datetime.parseISO8601Date(program.StartDate, true); var startDateText = LibraryBrowser.getFutureDateText(startDate); var endDate = datetime.parseISO8601Date(program.EndDate, true); if (startDateText != currentIndexValue) { html += '