Hi Guys
Please help for below code. If time zone is GMT-3 (Brisilia) and current month is october then this code is hanging. you can check by simply putting this code in some html.
Please help in resolving and understanding this code. Due to this one of our crtical website users are facing lot of issues.
I can use timezone offset and make it independent of time zone, however reason is unclear why it has issues in first place in October in specific timezones.
Thanks
Pranav Sharma
**************************************************************************************************
<script type="text/javascript">
var nDate;
var nCurrentYear = 2011;
var nCurrentMonth = 10;
nYear=2011;
nMonth=10;
var date = new Date(nYear, nMonth-1, 1);
document.write('Month:'+date.getMonth() +':CurrentMonth:'+nCurrentMonth);
while (date.getMonth() == nCurrentMonth-1)
{
nDate = date.getDate();
//alert(' date String===== '+ date.toDateString() +" Date parameter::"+date.getDate()+1 );
document.write(date.toDateString());
date = new Date(nCurrentYear, date.getMonth(), date.getDate()+1);
}
</script>
*******************************************************************************


