With this function you can get the number of days that the given year has, returning 365 for a normal year, and 366 for a leap year.
date_days_in_year(date);
Argument | Type | Description |
---|---|---|
date | Datetime | The date to use. |
days = date_days_in_year(date_current_datetime());
This would set "days" to the number of days in the current year.