<script>
function daysInMonth(month,year) {
return new Date(year, month, 0).getDate();
}
</script>
<SCRIPT LANGUAGE="JavaScript">
temp_date = new Date();
day = temp_date.getDate();
month = temp_date.getMonth() + 1;
year = temp_date.getFullYear();
if (day < 10) {
day = "0" + day;
}
if (month <10) {
month = "0" + month;
}
var daysInThisMonth = daysInMonth(month,year);
for (var i = 0; i < daysInThisMonth; i++) {
var currentDay = i+1;
document.write('<a href="http://gostar.bget.ru/events/' + day + month + year +'">'+ currentDay +'</a>');
}
</script>