@param DateTimeOfDay $object

@return bool
5585
public function earlierThan($object)
    {
        if (!$this->sameTypeAs($object)) {
            throw new NotMatchTypeException($this);
        }

        return $this->date()->earlierThan($object->date()) || ($this->date()->equalsTo($object->date()) && $this->time()->earlierThan($object->time()));
    }
908268
public static function isBetweenDates(?DateTimeInterface $date = null, ?DateTimeInterface $from = null, ?DateTimeInterface $to = null): bool
    {
        $date = $date ?? self::createFromTimestamp();

        if ($from instanceof DateTimeInterface && $date < $from) {
            return false;
        }

        if ($to instanceof DateTimeInterface && $date > $to) {
            return false;
        }

        return true;
    }
552774
public function mtime($key)
    {
        if ($object = $this->tryGetObject($key)) {
            return (new \DateTime($object->getLastModified()))->format('U');
        }

        return false;
    }
1160269
public function isInDay(DateTimeInterface $now) : bool
	{
		if (($days = $this->values[static::DAYS]) !== NULL) {
			return in_array($now->format('D'), $days);
		}

		return TRUE;
	}
472010
public function checkInstanceOfRestriction($object) : bool
    {
        return empty($this->instanceOf)|| $object instanceOf $this->instanceOf;
    }
1060998
public function Equals( $obj )
	{
		if ( ! $obj instanceof GMonthValue )
		{
			return false;
		}

		/**
		 * @var DateTimeValueBase $other
		 */
		$other = $obj;
		return $this->ToString( null ) == $other->ToString( null );
	}
1269133
public function equalsTo(Object $object)
    {
        if (!$this->sameTypeAs($object)) {
            throw new NotMatchTypeException($this);
        }

        return
            $this->year() === $object->year() &&
            $this->month() === $object->month() &&
            $this->day() === $object->day();
    }
316418
public function isDayOfWeek($dayOfWeek)
    {
        if (is_string($dayOfWeek) && defined($constant = static::class.'::'.strtoupper($dayOfWeek))) {
            $dayOfWeek = constant($constant);
        }

        return $this->dayOfWeek === $dayOfWeek;
    }
461739
public function exists(string $object) : bool
    {
        return (!empty($this->registry) && isset($this->registry[$object]));
    }
1181559
public static function phone($object): bool
    {
        if (Any::isEmpty($object)) { // allow empty
            return true;
        }

        if (!Any::isLine($object)) {
            return false;
        }

        return Str::isPhone($object);
    }
289463
public function isSatisfiedBy($object)
    {
        return $this->left->isSatisfiedBy($object) && $this->right->isSatisfiedBy($object);
    }
856002
public static function datetime($value): bool
    {
        if ($value instanceof \DateTime) {
            return true;
        } elseif (strtotime($value) !== false) {
            return true;
        }

        return false;
    }
361574
public function Equals( $obj )
	{
		if ( ! $obj instanceof GDayValue )
		{
			return false;
		}

		/**
		 * @var DateTimeValueBase $other
		 */
		$other = $obj;
		return $this->ToString( null ) == $other->ToString( null );
	}
520306
public static function email($object): bool
    {
        if (Any::isEmpty($object)) { // allow empty
            return true;
        }

        if (!Any::isLine($object)) {
            return false;
        }

        return Str::isEmail($object);
    }
1009892
public static function validate_object($object) {
		$pattern = '/^\//';
		if (empty ( $object ) || ! preg_match ( $pattern, $object )) {
			return false;
		}
		return true;
	}
946999
private function matchesNearestWeekday($day, \DateTime $date)
    {
        $day = new \DateTime($date->format('F') . ' ' . substr($day, 0, -1) . ' ' . $date->format('Y'));
        $weekday = $day->format('w');

        if ($day->format('d') == $date->format('d') && $weekday !== '0' && $weekday !== '6') {
            return true;
        } elseif ($weekday == '0'
                  && $day->format('d') != $day->format('t')
                  && $this->getModifiedDateTime($day, 'next day')->format('d') == $date->format('d')
        ) {
            return true;
        } elseif ($weekday == '6'
                  && $day->format('d') != '1'
                  && $this->getModifiedDateTime($day, 'previous day')->format('d') == $date->format('d')
        ) {
            return true;
        }

        return false;
    }
593252
public function isValidType($object): bool
    {
        if ($this->type == null || $object == null) {
            return true;
        }

        if (is_object($object) && get_class($object) == $this->type) {
            return true;
        }

        return (MDataType::getType($object) == $this->type);
    }