public function BirthdaysBirthday::isLeapYear in Birthdays 7
Checks if a given year is a leap year.
Parameters
$year: The year.
Return value
TRUE if it is a leap year.
2 calls to BirthdaysBirthday::isLeapYear()
- BirthdaysBirthdayTestCase::testLeapYear in ./
birthdays.test - Tests BirthdaysBirthday::isLeapYear().
- _birthdays_get in ./
birthdays.module - Queries the database for birthdays.
File
- ./
birthdays_birthday.inc, line 350 - The BirthdaysBirthday class.
Class
- BirthdaysBirthday
- Converts between different data representations and do calculations on a birthday.
Code
public function isLeapYear($year) {
return (bool) date('L', strtotime($year . '-1-1'));
}