Tribe__Date_Utils::get_last_day_of_month( int $timestamp )
Returns the last day of the month given a php date.
Contents
Parameters
- $timestamp
-
(int) (Required) THe timestamp.
Return
(string) The last day of the month.
Source
File: src/Tribe/Date_Utils.php
public static function get_last_day_of_month( $timestamp ) { $curmonth = date( 'n', $timestamp ); $curYear = date( 'Y', $timestamp ); $nextmonth = mktime( 0, 0, 0, $curmonth + 1, 1, $curYear ); $lastDay = strtotime( date( self::DBDATETIMEFORMAT, $nextmonth ) . ' - 1 day' ); return date( 'j', $lastDay ); }