Date between x and y

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


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){

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”.