You are here

public function GetServices::validateDateExpression in Simple Node Importer 8

3 calls to GetServices::validateDateExpression()
GetServices::buildNodeData in src/Services/GetServices.php
GetServices::generateFieldSetValue in src/Services/GetServices.php
GetServices::validateDate in src/Services/GetServices.php

File

src/Services/GetServices.php, line 1285

Class

GetServices

Namespace

Drupal\simple_node_importer\Services

Code

public function validateDateExpression($date) {
  $regExp = "#^[0-9ampAMP :/-]+\$#";
  if (preg_match($regExp, $date)) {
    return TRUE;
  }
  else {
    return FALSE;
  }
}