1

how to localize the Zend_Date

when i wrote

Zend_Debug::dump(Zend_Locale::getTranslationList('type', 'en_US'));

i got long array some of its elements

  .
  .
  ["hebrew"] => string(15) "Hebrew Calendar"
  ["indian"] => string(24) "Indian National Calendar"
  ["islamic"] => string(16) "Islamic Calendar"
  ["islamic-civil"] => string(22) "Islamic-Civil Calendar"
  ["japanese"] => string(17) "Japanese Calendar"
  .
  .

so i think Islamic Calendar , Hebrew Calendar is supported how to reach this features?

also it is commented in this page http://framework.zend.com/issues/browse/ZF-4291

ahmedsafan86
  • 1,776
  • 1
  • 26
  • 49
  • 2
    **Exact** duplicate of [Calendars in zend framework](http://stackoverflow.com/questions/5476675/calendars-in-zend-framework) – Aron Rotteveel Mar 30 '11 at 09:07

1 Answers1

0

Why you don't have a look at the documentation, that's always the first thing you should do: Working with Dates and Times.

So with Zend_Locale_Format you can normalize and convert date and time for different locale.

E.g. you can normalize a data by locale like this:

  $locale = new Zend_Locale('de_AT');

  $date = Zend_Locale_Format::getDate('13.04.2005 22:14:55',
                                       array('date_format' =>
                                           Zend_Locale_Format::STANDARD,
                                       'locale' => $locale)   
  );

Hope that helps ;) . So this is the answer I got from him: you should have a look at WebCal.

DarkLeafyGreen
  • 69,338
  • 131
  • 383
  • 601
  • you say "Why you don't have a look at the documentation" i say why you don't look at the question i'm as asking about calendar not just a format 31/3/2011 gregorian calendar is 26/4/1432 in hijri islamic calendar. have you got it? – ahmedsafan86 Mar 31 '11 at 06:35
  • Do you want to display a calender? – DarkLeafyGreen Mar 31 '11 at 06:51
  • the default calendar of Zend_Date is gregorian. is countries like Audi Arabia the calendar used is hijri[Islamic] . how can i support this calendar type in zend-framework? – ahmedsafan86 Mar 31 '11 at 07:30
  • 1
    @Ahmed: I don't think it is supported yet. But I could be wrong. I believe there was a proposal `Zend_Calendar` which would do what you want. But I can't see the status of the proposal, because the service is down now. – Decent Dabbler Mar 31 '11 at 07:35
  • I have contacted the author of Zend_Calender. Let's wait for his answer. – DarkLeafyGreen Mar 31 '11 at 07:45
  • nice work thanks a lot for your help. i sent him an email yesterday but no reply till now. i'm waiting... – ahmedsafan86 Mar 31 '11 at 07:51