views:

29

answers:

0

I am trying to make a custom php date function for use within D6 that will show dates in the correct format for Chinese.

I created the date format within the Date API area of D6, something along the lines of:

Y\年n\月j\日

In the Date admin area, this correctly display as "2010年10月22日". My problem occurs when I bring this over to Views where I want to display the date along with other fields in the node. I instead get something like this: "2010年10月22日 年月日", where each of those escaped characters are repeated twice.

I tested this with Views showing either just the From date of the Date field, or both the From and To dates. The error occurs regardless, with the From-To option showing as "2010年10月22日 - 2010年10月23日 年月日". Note that the escaped characters repeat only once even those it's showing a From and To date.

Finally, as a side issue to this: My date function is actually longer (Y\年n\月j\日lG:i\点), including time, and the php function is showing the time character even if there is no time to list. Is there a way to tie the escaped character to the php function variable? I.E. I only want to show 点 (time/o'clock), if the function actually is going to display something for "G:i".