Tribe__Date_Utils::get_last_day_of_month( int $timestamp )

Returns the last day of the month given a php date.


Parameters

$timestamp

(int) (Required) THe timestamp.


Top ↑

Return

(string) The last day of the month.


Top ↑

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 );
		}