コード例 #1
0
 protected function createRule()
 {
     return Rules::daysAgo();
 }
コード例 #2
0
 protected function createRule()
 {
     return Rules::yesterday();
 }
コード例 #3
0
 protected function createRule()
 {
     return Rules::tomorrow();
 }
コード例 #4
0
 /**
  * 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()]);
     });
 }
コード例 #5
0
 protected function createRule()
 {
     return Rules::secondsAgo();
 }
コード例 #6
0
 protected function createRule()
 {
     return Rules::monthsAgo();
 }