You are here

public static function DateTimeHelper::dateIsMySQLDateOnly in Content Planner 8

Check is a given string is a date of the MySQL Date Only format.

Parameters

string $value:

Return value

false|int

1 call to DateTimeHelper::dateIsMySQLDateOnly()
content_calendar_form_node_form_alter in modules/content_calendar/content_calendar.module
Implements hook_form_BASE_FORM_ID_alter().

File

modules/content_calendar/src/DateTimeHelper.php, line 120

Class

DateTimeHelper

Namespace

Drupal\content_calendar

Code

public static function dateIsMySQLDateOnly($value) {
  return preg_match("/" . self::FORMAT_MYSQL_DATE_ONLY_REGEX . "/", $value);
}