function calendar_max_weeks in Calendar 5.2
Find the number of calendar weeks for a year.
Parameters
int $year:
Return value
int number of calendar weeks in selected year.
1 call to calendar_max_weeks()
File
- ./
calendar.module, line 80 - Adds calendar filtering and displays to Views.
Code
function calendar_max_weeks($year) {
$date = date_make_date($year + 1 . '-01-01 12:00:00', 'UTC');
date_modify($date, '-1 day');
return date_week(date_format($date, DATE_FORMAT_DATE));
}