Tribe__Date_Utils::first_day_in_month( mixed $month )

Returns the weekday of the 1st day of the month in “w” format (ie, Sunday is 0 and Saturday is 6) or false if this cannot be established.


Parameters

$month

(mixed) (Required)


Top ↑

Return

(int|bool)


Top ↑

Source

File: src/Tribe/Date_Utils.php

		public static function first_day_in_month( $month ) {
			try {
				$date  = new DateTime( $month );
				$day_1 = new DateTime( $date->format( 'Y-m-01 ' ) );
				return $day_1->format( 'w' );
			}
			catch ( Exception $e ) {
				return false;
			}
		}