Date between x and y

Onze verontschuldigingen, dit bericht is alleen beschikbaar in het Amerikaans Engels. Voor het gemak van de kijker, is de inhoud hieronder weergegeven in de alternatieve taal. Je kunt klikken op de link om naar de actieve taal over te schakelen.

Hereby an example that explains how you can trigger blocky rules only when the current date is between 2 days:

blockly_date_between

The php code used inside the block, so you can copy paste it:

$startTime = strtotime($startdate);
$endTime = strtotime($enddate);
$startFormat = date('Y-m-d',$startTime);
$endFormat=date('Y-m-d', $endTime);
if(date('Y-m-d') >= $startFormat && date('Y-m-d') < = $endFormat){
	$datebetween=true;
}else{
	$datebetween=false;
}

If you want to do it between 2 timestamps instead,
there is inside blocky under “Utils” the option “Time =”.
If you click on the = sign you can change it to “between”.
This allows you to put “Time between”.