Inventory_Presser_Business_Day::open_right_now()

open_right_now


Description Description

Is the business open right now?


Top ↑

Return Return

(bool)


Top ↑

Source Source

File: includes/class-business-day.php

	public function open_right_now()
	{
		$now = $this->current_datetime();
		$today_open_date = $this->current_datetime();
		$today_open_date->setTime( $this->open_hour, $this->open_minute, 0 );

		$today_close_date = $this->current_datetime();
		$today_close_date->setTime( $this->close_hour, $this->close_minute, 0 );

		return null != $today_open_date && $now >= $today_open_date && $now < $today_close_date;
	}