Page 1 of 1

Date conversion question

Posted: Fri Oct 15, 2004 11:08 am
by Handler
Greetings!

Guess this is a fairly simple question. But after going over the manual and looking at a few of the date functions I really couldn't find something that I wanted. 8O

What I'm looking for is a way to convert a number to the alpha month and then vice-versa. (ex 1 -> January and then January -> 1).

Thanks for the words of wisdom!

Handler

Posted: Sat Oct 16, 2004 6:05 am
by dethron
use array if there exists a one-to-one correspondence from alpha to month.

or if alphas are some valid date then use date() with "n"

Posted: Sat Oct 16, 2004 7:29 am
by m3mn0n
Yeah a simple 12 key [php_man]array()[/php_man] inside a function that also as a [php_man]foreach()[/php_man] loop & [php_man]if()[/php_man] statement should do the trick.

Posted: Sat Oct 16, 2004 9:29 am
by dethron
[php_man]foreach()[/php_man] and [php_man]if()[/php_man], hmmm i should think about them :lol:

Posted: Sat Oct 16, 2004 6:21 pm
by m3mn0n
8)