/* This script and many more are available free online at The JavaScript Source :: http://javascript.internet.com Created by: Francis Cocharrua :: http://scripts.franciscocharrua.com/ */ function calendar(date) { // If no parameter is passed use the current date. if(date == null) date = new Date("2010/9/5"); day = date.getDate(); month = date.getMonth(); year = date.getFullYear(); months = new Array('Ocak','Subat','Mart','Nisan','Mays','Haziran','Temmuz','Agustos','Eylül','Ekim','Kasim','Aralik'); this_month = new Date(year, month, 1); next_month = new Date(year, month + 1, 1); // Find out when this month starts and ends. first_week_day = this_month.getDay(); days_in_this_month = Math.round((next_month.getTime() - this_month.getTime()) / (1000 * 60 * 60 * 24)); calendar_html = '
| ' + months[month] + ' ' + year + ' | ||||||
| Pt Sa Çr Pe Cu Cm P | ||||||
| '; } week_day = first_week_day; for(day_counter = 1; day_counter <= days_in_this_month; day_counter++) { week_day %= 7; if(week_day == 1) calendar_html += ' | ||||||