You are here

private static function DatexPoorMansJaliliCalendar::substr in Datex 8

2 calls to DatexPoorMansJaliliCalendar::substr()
DatexPoorMansJaliliCalendar::getDayNames in src/Datex/DatexPoorMansJaliliCalendar.php
DatexPoorMansJaliliCalendar::getMonthNames in src/Datex/DatexPoorMansJaliliCalendar.php

File

src/Datex/DatexPoorMansJaliliCalendar.php, line 167
Fallback calendar implementation in case php-intl is not avaiable.

Class

DatexPoorMansJaliliCalendar
Jalali calendar for datex.

Namespace

Drupal\datex\Datex

Code

private static function substr($str, $start, $len) {
  if (function_exists('mb_substr')) {
    return mb_substr($str, $start, $len, 'UTF-8');
  }
  else {
    return substr($str, $start, $len * 2);
  }
}