Re: [PHP] Reverse of date("w")

2006-09-22 Thread Richard Lynch
On Mon, September 18, 2006 5:09 pm, Kevin Murphy wrote: > I'm looking for something that will convert a the opposite of the date > ("w") function. In other words, if I have the number "3", I would > like it to return "Wednesday". Is there such a beast out there > besides writing a switch or array o

Re: [PHP] Reverse of date("w")

2006-09-19 Thread Kevin Murphy
Kevin Murphy wrote: Not really. If it were always "today" that would work, but in this case, I was thinking of storing a day of the week in a database ("3"), and then display the info based on that digit. So assuming that the number was in fact 3, then: echo date("D","3"); Would return "Wed".

Re: [PHP] Reverse of date("w")

2006-09-18 Thread Travis Doherty
Chris Ditty wrote: > Another way to do it would be to store the unix epoch and then just > get the > weekday name from that? More overhead than Travis's idea, but just as > good > and you could possibly use the date/time later on. I use the DATETIME fieldtypes in MySQL, same idea... 100% agre

Re: [PHP] Reverse of date("w")

2006-09-18 Thread Chris Ditty
Another way to do it would be to store the unix epoch and then just get the weekday name from that? More overhead than Travis's idea, but just as good and you could possibly use the date/time later on. On 9/18/06, Travis Doherty <[EMAIL PROTECTED]> wrote: Kevin Murphy wrote: > Not really. If

Re: [PHP] Reverse of date("w")

2006-09-18 Thread Travis Doherty
Kevin Murphy wrote: > Not really. If it were always "today" that would work, but in this > case, I was thinking of storing a day of the week in a database > ("3"), and then display the info based on that digit. So assuming > that the number was in fact 3, then: > > echo date("D","3"); > > Would

Re: [PHP] Reverse of date("w")

2006-09-18 Thread Kevin Murphy
Not really. If it were always "today" that would work, but in this case, I was thinking of storing a day of the week in a database ("3"), and then display the info based on that digit. So assuming that the number was in fact 3, then: echo date("D","3"); Would return "Wed". Is there any fu

RE: [PHP] Reverse of date("w")

2006-09-18 Thread Jay Blanchard
[snip] I'm looking for something that will convert a the opposite of the date ("w") function. In other words, if I have the number "3", I would like it to return "Wednesday". Is there such a beast out there besides writing a switch or array or something? [/snip] Perhaps http://www.php.net/ida

[PHP] Reverse of date("w")

2006-09-18 Thread Kevin Murphy
I'm looking for something that will convert a the opposite of the date ("w") function. In other words, if I have the number "3", I would like it to return "Wednesday". Is there such a beast out there besides writing a switch or array or something? -- Kevin Murphy Webmaster: Information and M