rem: this.drawCurrent = function() { CalendarNamespace.draw(this.currentMonth, this.currentYear, this.div_id, this.callback); } this.drawDate = function(month, year) { this.currentMonth = month; this.currentYear = year; this.drawCurrent(); } this.drawPreviousMonth = function() { if (this.currentMonth == 1) { this.currentMonth = 12; this.currentYear--; } else { this.currentMonth--; } this.drawCurrent(); } this.drawNextMonth = function() { if (this.currentMonth == 12) { this.currentMonth = 1; this.currentYear++; } else { this.currentMonth++; } this.drawCurrent(); } this.drawPreviousYear = function() { this.currentYear--; this.drawCurrent(); } this.drawNextYear = function() { this.currentYear++; this.drawCurrent(); } 
context: function Calendar(div_id, callback) {    // div_id (string) is the ID of the element in which the calendar will    //     be displayed    // callback (string) is the name of a JavaScript function that will be    //     called with the parameters (year, month, day) when a day in the    //     calendar is clicked    this.div_id = div_id;    this.callback = callback;    this.today = new Date();    this.currentMonth = this.today.getMonth() + 1;    this.currentYear = this.today.getFullYear();    this.drawCurrent = function() {        CalendarNamespace.draw(this.currentMonth, this.currentYear, this.div_id, this.callback);    }    this.drawDate = function(month, year) {        this.currentMonth = month;        this.currentYear = year;        this.drawCurrent();    }    this.drawPreviousMonth = function() {        if (this.currentMonth == 1) {            this.currentMonth = 12;            this.currentYear--;        }        else {            this.currentMonth--;        }        this.drawCurrent();    }    this.drawNextMonth = function() {        if (this.currentMonth == 12) {            this.currentMonth = 1;            this.currentYear++;        }        else {            this.currentMonth++;        }        this.drawCurrent();    }    this.drawPreviousYear = function() {        this.currentYear--;        this.drawCurrent();    }    this.drawNextYear = function() {        this.currentYear++;        this.drawCurrent();    }}
meta: 4610	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4610/3daf7bde2e150c623b80a3a0518196121bd4ea36/calendar.js/buggy/django/contrib/admin/media/js/calendar.js