title: Internationalized date formatting with Zend_Date ( Japanese )
body: <blockquote>
    <p>Disclaimer: you might need to install
    a font/typeface which supports
    Japanese if you see messed up
    characters.</p>
  </blockquote>
  
  <p>I'm trying to replicate what I've been doing so far with <code>setlocale</code> and <code>strftime</code>:</p>
  
  <pre><code>setlocale(LC_ALL, 'ja_JP.utf8');
  $time = mktime();
  echo strftime('%x', $time), '&lt;br&gt;';
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>2010年01月06日
  </code></pre>
  
  <p>Using Zend_Date - but I haven't been able to reproduce the same formatting with the japanese symbols for year, month and day.</p>
  
  <p>Attempt #1:</p>
  
  <pre><code>$locale = new Zend_Locale('ja_JP');
  
  $date = new Zend_Date( strtotime('yesterday'), null, $locale);
  //echo $date-&gt;toString('YYYY abcdefghijklmnopqrstuvwxy M dE');
  echo $date-&gt;get('YYYY MMM DD');
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>2010 1月 004
  </code></pre>
  
  <p>Attempt #2:</p>
  
  <pre><code>echo $date-&gt;get(Zend_Date::DATE_FULL);
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>2010年1月5日火曜日
  </code></pre>
  
  <p>My first attempt I can't seem to find a working constant to produce the YEAR and day symbols. The latter uses a standardized format but I need to customize it so there's a <code>0</code> preceding the month, and I want to be more in control.</p>
  
  <p>In the future I may want to make it flexible so for example, en_US dates won't have those letters coming after the year/month/day but it would only apply to languages such as Japanese and others, where it's more common, or if I misunderstood and it isn't really common then please inform me.</p>
  
  <p>Thanks in advance.</p>