public function Date::ParsiNumbers in PersianTools 7
converts digits to Persian traditional font face and corrects the no-width space in words use the function on the returned value in the source code
@access private
Parameters
string $phrase:
Return value
string
1 call to Date::ParsiNumbers()
- Date::format in includes/
Date.php - this is a clone of the internal php function date() with a few exceptions in the acceptable parameters
File
- includes/
Date.php, line 226
Class
Namespace
ShamsiCode
public function ParsiNumbers($phrase) {
$L = array(
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
);
$F = array(
"۰",
"۱",
"۲",
"۳",
"۴",
"۵",
"۶",
"۷",
"۸",
"۹",
);
return str_replace($L, $F, $phrase);
}