Tribe__Date_Utils::last_day_in_month( mixed $month )
Returns the weekday of the last day of the month in “w” format (ie, Sunday is 0 and Saturday is 6) or false if this cannot be established.
Contents
Parameters
- $month
-
(mixed) (Required)
Return
(int|bool)
Source
File: src/Tribe/Date_Utils.php
public static function last_day_in_month( $month ) {
try {
$date = new DateTime( $month );
$day_1 = new DateTime( $date->format( 'Y-m-t' ) );
return $day_1->format( 'w' );
}
catch ( Exception $e ) {
return false;
}
}