public static String BuildWeekCellWrap(WeeklyData week, int prevQuarter, int prevMonth)
        {
            String ret = "";
            if (week.Quarter != prevQuarter && week.StartDate.Month != prevMonth)
            {
                ret = ret + "</tr></table> </tr></td></table>  </td><td class='blueBorder'>" + YearQuarterText(week) + "<table cellpadding=0 and cellspacing=0><tr><td> <table cellpadding=0 and cellspacing=0 class='blueBorder'><tr>" + BuildWeekCell(week.hasProgramming);
            }
            else if (week.StartDate.Month != prevMonth)
            {
                ret = ret + "</tr></table> </td><td>  <table cellpadding=0 and cellspacing=0 class='blueBorder'><tr>" + BuildWeekCell(week.hasProgramming);
            }
            else
            {
                ret = ret + BuildWeekCell(week.hasProgramming);
            }

            return ret;
        }
 public static string YearQuarterText(WeeklyData week)
 {
     return "<div style='font-size:7pt; width:50px;'>" + week.Year + " - " + week.Quarter + "</div>";
 }
        public static List<WeeklyData> getAllWeeksInRange(DateTime startdate, DateTime enddate)
        {
            List<WeeklyData> ret = new List<WeeklyData>();
            GregorianCalendar cal = new GregorianCalendar();
            for (DateTime datecounter = startdate; datecounter <= enddate; datecounter = datecounter.AddDays(7))
            {
                WeeklyData programweek = new WeeklyData();
                programweek.StartDate = datecounter;
                programweek.EndDate = datecounter.AddDays(7);
                programweek.Year = datecounter.Year;
                programweek.WeekNumber = cal.GetWeekOfYear(datecounter, CalendarWeekRule.FirstDay, DayOfWeek.Monday);
                programweek.Quarter = getQuarter(datecounter.Month);
                ret.Add(programweek);
            }

            return ret;
        }