Author: pyaschenko
Date: 2007-06-14 10:22:57 -0400 (Thu, 14 Jun 2007)
New Revision: 1183
Modified:
trunk/sandbox/calendar/design/calendar-js/calendar-prototype.js
Log:
dates rendering bug fixed
Modified: trunk/sandbox/calendar/design/calendar-js/calendar-prototype.js
===================================================================
--- trunk/sandbox/calendar/design/calendar-js/calendar-prototype.js 2007-06-14 13:36:44
UTC (rev 1182)
+++ trunk/sandbox/calendar/design/calendar-js/calendar-prototype.js 2007-06-14 14:22:57
UTC (rev 1183)
@@ -36,7 +36,7 @@
var tfdow = fdow;
var firstDay = new Date(year,0,1);
var fDay = firstDay.getDay();
- var daynum = ((Date.UTC(y2k(year),month,1,0,0,0) - Date.UTC(y2k(year),0,1,0,0,0))
/1000/60/60/24)+1 ;
+ var daynum = ((Date.UTC(y2k(year),month,1,0,0,0) - Date.UTC(y2k(year),0,1,0,0,0))
/86400000)+1 ;
var weeknum = Math.round((daynum+7)/7);
if(fDay == 0) fDay = 7;
if(tfdow == 0) tfdow = 7;
@@ -190,7 +190,7 @@
// next month days
var ld = 7-p%7;
- while (dayCounter<=ld) { days.push({day:dayCounter++}); }
+ if (ld!=7) while (dayCounter<=ld) { days.push({day:dayCounter++}); }
// render
p=0;
Show replies by date