Example #1
0
 protected function createRule()
 {
     return Rules::daysAgo();
 }
 protected function createRule()
 {
     return Rules::yesterday();
 }
 protected function createRule()
 {
     return Rules::tomorrow();
 }
 /**
  * DateDiffCalculator that calculates diff to the past in one of the units:
  * - seconds
  * - minutes
  * - "yesterday"
  * - hours
  * - full date
  *
  * @return DateDiffCalculator
  */
 public static function upTo2Days()
 {
     return self::getOrCreate('up-to-2-days', function () {
         return new DateDiffCalculator([Rules::yesterday(), Rules::hoursAgo(), Rules::minutesAgo(), Rules::secondsAgo()]);
     });
 }
 protected function createRule()
 {
     return Rules::secondsAgo();
 }
 protected function createRule()
 {
     return Rules::monthsAgo();
 }