You are here

public constant DateRecurGranularityMap::GRANULARITY_EXPRESSIONS in Recurring Dates Field 8.2

Same name and namespace in other branches
  1. 3.x src/DateRecurGranularityMap.php \Drupal\date_recur\DateRecurGranularityMap::GRANULARITY_EXPRESSIONS
  2. 3.0.x src/DateRecurGranularityMap.php \Drupal\date_recur\DateRecurGranularityMap::GRANULARITY_EXPRESSIONS
  3. 3.1.x src/DateRecurGranularityMap.php \Drupal\date_recur\DateRecurGranularityMap::GRANULARITY_EXPRESSIONS

Granularities and their associated regex for validation.

File

src/DateRecurGranularityMap.php, line 39

Class

DateRecurGranularityMap
Granularity maps.

Namespace

Drupal\date_recur

Code

public const GRANULARITY_EXPRESSIONS = [
  'year' => '/^\\d{4}$/',
  'month' => '/^\\d{4}\\-\\d{2}$/',
  'day' => '/^\\d{4}\\-\\d{2}-\\d{2}$/',
  'second' => '/^\\d{4}\\-\\d{2}\\-\\d{2}\\T\\d{2}:\\d{2}:\\d{2}$/',
];