Skip to content

Instantly share code, notes, and snippets.

@codecowboy
Created July 31, 2011 17:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codecowboy/1116979 to your computer and use it in GitHub Desktop.
Save codecowboy/1116979 to your computer and use it in GitHub Desktop.
$('.fc-day-number').each(function(){
lDay = parseInt($(this).text());
//check if it is another month date
if($(this).parents('td').hasClass('fc-other-month'))
{
lYear = parseInt(cYear);
//if it is belong to the previous month
if(lDay>15)
{
lMonth = parseInt(cMonth) - 1;
lDate = new Date(lYear,lMonth,lDay,12,00,00,00);
dateArr.push(lDate);
}
else //belong to the next month
{
lMonth = parseInt(cMonth) + 1;
lDate = new Date(lYear,lMonth,lDay,12,00,00,00);
dateArr.push(lDate);
}
}
else
{
lMonth = parseInt(cMonth);
lDate = new Date(lYear,lMonth,lDay,12,00,00,00);
dateArr.push(lDate);
}
});
@codecowboy
Copy link
Author

codecowboy commented Aug 1, 2011 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment