1

I've a strange problem with Date formatting in Chinese.

enter image description here

The string has to appear after year(for example 2013年). The string appears in all years before 2013 and also in 2013. But if it is future year(2014, 2015 etc) then it doesn't appear.

This is the date format used.

Y\年 n\月 j\日

I am not sure if it is Drupal's problem or PHP's. And I have no clue how to debug this issue. Any kind of hint is most welcome.

3
  • This unusual, you say your character appear in 2013 but notshow in futures years?
    – Yuseferi
    Nov 27, 2013 at 7:33
  • Yes this is very unusual. The character does not appear in years like 2014, 2015, 2016 and so on. But it appears fine in 2010, 2011, 2012 and 2013. Nov 27, 2013 at 7:38
  • Do u test another characters (latin chars) ? Is this problem exist only for your character or it is for all character ?
    – Yuseferi
    Nov 27, 2013 at 7:42

1 Answer 1

0

I don't know really why but I have a solution for you first put you result in a variable, ( try you result something like this Y/n/j ) then exclude variable by / and finally use your character.

$temp=date('Y/n/j');
list($y,$n,$j)=exclude('\/',$temp);
$final="$y\年 $n\月 $j\日";

I hope be useful for you. :)

Not the answer you're looking for? Browse other questions tagged or ask your own question.