how to calculate total days in a year in php code example Example: php get total amount of days in month $DaysInCurrentMonth = date('t');