rem: if( weekNumber > 3 ) { var nextWeek = new Date( oldStartTime.getTime() + ( 1000 * 60 * 60 * 24 * 7 ) );  if( nextWeek.getMonth() != thisMonth ) {  weekNumber = 5; } }  
context: function getWeekNumberOfMonth(){   //get the day number for today.   var startTime = getDateTimeFieldValue( "start-date-text" );      var oldStartTime = startTime;   var thisMonth = startTime.getMonth();      var monthToCompare = thisMonth;   var weekNumber = 0;   while( monthToCompare == thisMonth )   {      startTime = new Date( startTime.getTime() - ( 1000 * 60 * 60 * 24 * 7 ) );      monthToCompare = startTime.getMonth();            weekNumber++;   }      if( weekNumber > 3 )   {      var nextWeek = new Date( oldStartTime.getTime() + ( 1000 * 60 * 60 * 24 * 7 ) );      if( nextWeek.getMonth() != thisMonth )      {         //its the last week of the month         weekNumber = 5;      }   }   return( weekNumber );}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/c1b15c09c6b219e895330e2fff1bcd04cc256045/eventDialog.js/buggy/calendar/resources/content/eventDialog.js