<?php

namespace ModulesGarden\HostingQuotaNotifications\App\Helper\Date;
/**
 * Description of Date
 *
 * @author Artur Pilch <artur.pi@modulesgarden.com>
 */
class Date
{
    public static function checkIfWaitedEnough($hoursToWait, $lastDate)
    {
        $lastDate = strtotime($lastDate);
        $hours    = sprintf("-%d hours", $hoursToWait);
        $date     = date("Y-m-d H:i:s", strtotime($hours));
        if ($lastDate < strtotime($date))
        {
            return true;
        }
        return false;
    }

}
