if(($cur_day+7) > Days_in_Month($cur_year,$cur_month)){ # its the last n-day of the month 'cause this day next week is in next month }