Re: other cultures calendar
| From: | Hartmut Holzgraefe | Date: | Wed, 14 Apr 2004 13:07:08 +0000 |
| Subject: | Re: other cultures calendar | ||
| References: | 1 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-551@lists.php.net to get a copy of this message | ||
omid wrote:
Hi, i want to extend an extention about cultures calendar (like Hebrew, Persian, Arabic and ...) like a simple date function with a new argumant as calendar type. for example: echo date('d-m-Y', PERSIAN); // it will return current date in Persian (Jalali) calendarsome notes on your approach extending date: - date() already has a 2nd optional parameter - date() is meant to be language independant, strftime() is its locale-aware counterpart (although locale support does not include non-gregorian calendars ...) - extending strftime() is not an option as it interfaces directly to the operation systems C library strftime() function - calendar support is currently available with ext/calendar that is part of the PHP source distribution, currently supporting Julian, Gregorian, French revolution and Jewish calendars ... that being said you might have a look into ext/calendar and consider adding more calendars to it (and maybe cleaning up the api at the same time?) i've done some maintainance work on thtat extension in the past so feel free to ask me any questions you may run into ... -- Hartmut Holzgraefe <hartmut@php.net>// PERSIAN is a constantI was extended some part of it with C, based on PHP API.