Answer the question
In order to leave comments, you need to log in
Where is the error in working with the date?
From the date() documentation php.net/manual/en/function.date.php
t - Number of days in the specified month from 28 to 31
$Tooday = date("Y-m-d"); // 2015-11-20
$ToodayMonth = date("n"); // 11
$AllDayMonth = date("t", $ToodayMonth); // 31
Answer the question
In order to leave comments, you need to log in
Because 1970-01-01 00:00:11 is January 1970 and has 31 days.
$AllDayMonth = date("t", $ToodayMonth);
$AllDayMonth = date("t", 11);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question