The Thai text I want to end up with is: อาทิตย์ 03 มกราคม 2016 to อาทิตย์ ๐๓ มกราคม ๒๐๑๖
I don't think it should matter what language but in this case it is Thai.
My function is:
$strdate = get_thai_date();
print_r($strdate["number"]);
And the output is:
Array (
[0] => ๐
[1] => ๑
[2] => ๒
[3] => ๓
[4] => ๔
[5] => ๕
[6] => ๖
[7] => ๗
[8] => ๘
[9] => ๙
)
The input is sunday 03 january 2016
and I am trying to return อาทิตย์ 03 มกราคม 2016
, but not อาทิตย์ ๐๓ มกราคม ๒๐๑๖
.
Would a function like preg_replace()
, strstr()
or something else work? Can someone provide an examples?
get_thai_date
function in WordPress or in PHP, where is this function coming from and how is it implemented? the same goes for the other variations you mentioned, they're not a part of standard WordPressget_thai_date()
function please?