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
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".
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
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
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
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
[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
7 matches
Mail list logo