phpOMS/Validation/Base/DateTime.php
2018-02-15 20:27:58 +01:00

47 lines
807 B
PHP

<?php
/**
* Orange Management
*
* PHP Version 7.1
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link http://website.orange-management.de
*/
declare(strict_types=1);
namespace phpOMS\Validation\Base;
use phpOMS\Validation\ValidatorAbstract;
/**
* Validate date.
*
* @package Validation
* @license OMS License 1.0
* @link http://website.orange-management.de
* @since 1.0.0
*/
abstract class DateTime extends ValidatorAbstract
{
/**
* Constructor.
*
* @since 1.0.0
*/
public function __construct()
{
}
/**
* {@inheritdoc}
*/
public static function isValid($value, array $constraints = null) : bool
{
return (bool) strtotime($value);
}
}