You are here

function _calendar_systems_tmp_fix_string in Calendar Systems 8.3

2 calls to _calendar_systems_tmp_fix_string()
CalendarSystemsDate::processDate in src/Element/CalendarSystemsDate.php
Processes a date form element.
CalendarSystemsDateTime::valueCallback in src/Element/CalendarSystemsDateTime.php
Determines how user input is mapped to an element's #value property.

File

./calendar_systems.module, line 246

Code

function _calendar_systems_tmp_fix_string(?string $value) : ?string {
  if (empty($value)) {
    return $value;
  }
  return strtr($value, [
    '۰' => '0',
    '۱' => '1',
    '۲' => '2',
    '۳' => '3',
    '۴' => '4',
    '۵' => '5',
    '۶' => '6',
    '۷' => '7',
    '۸' => '8',
    '۹' => '9',
  ]);
}