Tribe__Date_Utils::date_diff( string $date1, string $date2 )

The number of days between two arbitrary dates.


Parameters

$date1

(string) (Required) The first date.

$date2

(string) (Required) The second date.


Top ↑

Return

(int) The number of days between two dates.


Top ↑

Source

File: src/Tribe/Date_Utils.php

		public static function date_diff( $date1, $date2 ) {
			// Get number of days between by finding seconds between and dividing by # of seconds in a day
			$days = self::time_between( $date1, $date2 ) / ( 60 * 60 * 24 );

			return $days;
		}