rem: monthName += " " + aStart.year; 
add: monthName += " " + start.year; 
context: function monthPrint_format(aStream, aStart, aEnd, aCount, aItems, aTitle) {    var html = <html/>    html.appendChild(            <head>                <title>{aTitle}</title>                <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'/>                <style type='text/css'/>            </head>);    html.head.style = ".main-table { font-size: 26px; font-weight: bold; }\n";    html.head.style += ".day-name { border: 1px solid black; background-color: #e0e0e0; font-size: 12px; font-weight: bold; }\n";    html.head.style += ".day-box { border: 1px solid black; vertical-align: top; }\n";    html.head.style += ".out-of-month { background-color: gray !important; }\n";    html.head.style += ".day-off { background-color: #D3D3D3 !important; }\n";    // Play around with aStart and aEnd to determine the minimal number of    // months we can show to still technically meet their requirements.  This    // is most useful when someone printed 'Current View' in the month view. If    // we take the aStart and aEnd literally, we'll print 3 months (because of    // the extra days at the start/end), but we should avoid that.    //    // Basically, we check whether aStart falls in the same week as the start    // of a month (ie aStart  is Jan 29, which often is in the same week as    // Feb 1), and similarly whether aEnd falls in the same week as the end of    // a month.    var weekStart = getPrefSafe("calendar.week.start", 0);    maybeNewStart = aStart.clone();    maybeNewStart.day = 1;    maybeNewStart.month = aStart.month+1;    maybeNewStart.normalize();    var firstDate = maybeNewStart.startOfWeek;    firstDate.day += weekStart;    firstDate.normalize();    if (firstDate.weekday < weekStart) {        // Go back one week to make sure we display this day        firstDate.day -= 7;        firstDate.normalize();    }    if (firstDate.compare(aStart) != 1) {        aStart = maybeNewStart;    }    var maybeNewEnd = aEnd.clone();    maybeNewEnd.day = 1;    maybeNewEnd.month = aEnd.month-1;    maybeNewEnd.normalize();    var lastDate = maybeNewEnd.endOfMonth.endOfWeek;    lastDate.day += weekStart;    lastDate.normalize();    if (lastDate.weekday < weekStart) {        // Go back one week so we don't display any extra days        lastDate.day -= 7;        lastDate.normalize();    }    // aEnd is exclusive, so we can add another day and be safe    lastDate.day += 1;    lastDate.normalize();    if (lastDate.compare(aEnd) != -1) {        aEnd = maybeNewEnd;    }    var date = aStart.clone();    date.day = 1;    var body = <body/>    while (date.month <= aEnd.month) {        var monthName = calGetString("dateFormat", "month." + (date.month +1)+ ".name");        monthName += " " + aStart.year;        body.appendChild(                     <table border='0' width='100%' class='main-table'>                         <tr>                              <td align='center' valign='bottom'>{monthName}</td>                         </tr>                     </table>);        body.appendChild(this.getStringForMonth(date, aItems));        // Make sure each month gets put on its own page        body.appendChild(<br style="page-break-after:always;"/>);        date.month++;        date.normalize();    }    html.appendChild(body);dump('\n'+html.toXMLString()+'\n');    var convStream = Components.classes["@mozilla.org/intl/converter-output-stream;1"]                               .getService(Components.interfaces.nsIConverterOutputStream);    convStream.init(aStream, 'UTF-8', 0, 0x0000);    convStream.writeString(html.toXMLString());};
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/778802fc478884566c0e154958926b381d3a02ec/calMonthGridPrinter.js/buggy/calendar/import-export/calMonthGridPrinter.js