Re: Re: cvs: php4 /pear/Date Calc.php
| From: | Andrei Zmievski | Date: | Mon, 20 Aug 2001 21:02:37 +0000 |
| Subject: | Re: Re: cvs: php4 /pear/Date Calc.php | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-1633@lists.php.net to get a copy of this message | ||
On Mon, 20 Aug 2001, yavor shahpasov wrote:
> The whole point was that I couldn't find a function to do this, get a month
> name and return the month number, not in the date class and not in the php
> date functions, if there is such a function and I've missed it ok.
>
> Now the only way to have it working with the current locale would need to
> have all month names in all langauges no?
If you set your locale with setlocale() or otherwise, then
strftime('%B') will return the localized month name. You can use it to
build an array of month names. The day names would work similarly.
-Andrei
As I was going up the stair, I met a man who wasn't there.
He wasn't there again today. I wish, I wish he'd stay away.
-Hughes Mearns