Hello,

i added a date format Y/年n/月.

As result i receive "2011年8月 年月".
But i like to have "2011年8月"

What's the problem?

I'm using Drupal7 with i18n.

Thank you very much,
Patrick

Comments

kevinwo’s picture

I spent quite a bit of time poking around for a solution as well, only to find others with the same problem (http://drupal.org/node/1143286). While not ideal, I've implemented the following temporary solution to strip out unwanted characters:

substr_replace($fields['field_post_date']->content, "", strrpos($fields['field_post_date']->content, " 年月"), strlen(" 年月"))

sujann143’s picture

Hi may i know where do u put this code?

hgoto’s picture

This problem is solved If we use `\` before the characters. I mean, we can get a proper display if `"Y年m月"` is changed to `"Y\年m\月"`.

- https://www.drupal.org/node/1143286#comment-6443784

It's too late but I think this information will be useful for people who encounter this problem in future.

chinrae2015’s picture

Well i think 2014.8 would suffice, wouldn't it? It can't be confusing to the users when it comes to year like 2011, 2012, 2013... and it is naturally followed by the month in Chinese tradition :)