What a hoot!
When I saw the the number of post to this thread, I figured someone
got their shorts in a knot.
Only a bunch of geeks could get into this much discussion of what day
of the week it is. Aren't we a sad lot?
Cheers,
tedd
--
---
http://sperling.com http://ancientstones.com
On Fri, 2007-05-25 at 09:10 -0400, tedd wrote:
What a hoot!
When I saw the the number of post to this thread, I figured someone
got their shorts in a knot.
Only a bunch of geeks could get into this much discussion of what day
of the week it is. Aren't we a sad lot?
Only if we take
Robert Cummings wrote:
On Fri, 2007-05-25 at 09:10 -0400, tedd wrote:
What a hoot!
When I saw the the number of post to this thread, I figured someone
got their shorts in a knot.
Only a bunch of geeks could get into this much discussion of what day
of the week it is. Aren't we a sad lot?
On Fri, 2007-05-25 at 17:26 +0200, Jochem Maas wrote:
Robert Cummings wrote:
On Fri, 2007-05-25 at 09:10 -0400, tedd wrote:
What a hoot!
When I saw the the number of post to this thread, I figured someone
got their shorts in a knot.
Only a bunch of geeks could get into this much
On Tue, May 22, 2007 11:46 am, Bosky, Dave wrote:
How can I convert the numerical day of week to the string version?
Example, if the day of the week is 1 I would like to print out
'Sunday'.
$days = array(1='Sunday', 'Mondy', 'Tuesday', 'Wednesday',
'Thursday', 'Friday', 'Saturday');
echo
On 22/05/07, Robert Cummings [EMAIL PROTECTED] wrote:
On Tue, 2007-05-22 at 13:47 -0500, Greg Donald wrote:
On 5/22/07, Robert Cummings [EMAIL PROTECTED] wrote:
Nothing said it was important, but why implement a half-assed solution
when you can implement a superior solution in as much time?
On Wed, 2007-05-23 at 10:31 +0300, Robin Vickery wrote:
On 22/05/07, Robert Cummings [EMAIL PROTECTED] wrote:
On Tue, 2007-05-22 at 13:47 -0500, Greg Donald wrote:
On 5/22/07, Robert Cummings [EMAIL PROTECTED] wrote:
Nothing said it was important, but why implement a half-assed solution
On 5/23/07, Robin Vickery [EMAIL PROTECTED] wrote:
they're all bloated:
print jddayofweek($day_number, 1);
Must go --enable-calendar now :)
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Wed, 2007-05-23 at 09:23 -0500, Greg Donald wrote:
On 5/23/07, Robin Vickery [EMAIL PROTECTED] wrote:
they're all bloated:
print jddayofweek($day_number, 1);
Must go --enable-calendar now :)
Awww, I didn't notice it's a compile flag... hmmm, not so portable that
way. Something tells
Do you mean by using the date() function?
On 5/22/07, Bosky, Dave [EMAIL PROTECTED] wrote:
How can I convert the numerical day of week to the string version?
Example, if the day of the week is 1 I would like to print out 'Sunday'.
Thanks,
Dave
Hi Dave,
Tuesday, May 22, 2007, 5:46:38 PM, you wrote:
How can I convert the numerical day of week to the string version?
Example, if the day of the week is 1 I would like to print out 'Sunday'.
$days = array(1 = 'Sunday', 2 = 'Monday', 3 = 'Tuesday', etc ...);
then just
$today = $days[1];
On 5/22/07, Bosky, Dave [EMAIL PROTECTED] wrote:
How can I convert the numerical day of week to the string version?
Example, if the day of the week is 1 I would like to print out 'Sunday'.
$days = array( 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday',
'Friday', 'Saturday' );
$day =
:[EMAIL PROTECTED]
*Sent:* Tuesday, May 22, 2007 12:50 PM
*To:* Bosky, Dave
*Cc:* php-general@lists.php.net
*Subject:* Re: [PHP] convert numerical day of week
Do you mean by using the date() function?
On 5/22/07, *Bosky, Dave* [EMAIL PROTECTED] wrote:
How can I convert the numerical day
On 5/22/07, Daniel Brown [EMAIL PROTECTED] wrote:
?
function num2day($num) {
if($num == 1) {
$day = Sunday;
} elseif($num == 2) {
$day = Monday;
} elseif($num == 3) {
$day = Tuesday;
} elseif($num == 4) {
$day = Wednesday;
} elseif($num == 5) {
On 5/22/07, Greg Donald [EMAIL PROTECTED] wrote:
On 5/22/07, Daniel Brown [EMAIL PROTECTED] wrote:
?
function num2day($num) {
if($num == 1) {
$day = Sunday;
} elseif($num == 2) {
$day = Monday;
} elseif($num == 3) {
$day = Tuesday;
} elseif($num
On Tue, 2007-05-22 at 12:46 -0400, Bosky, Dave wrote:
How can I convert the numerical day of week to the string version?
Example, if the day of the week is 1 I would like to print out 'Sunday'.
I saw a bunch of bad examples given to you that completely ignore any
available locale
On 5/22/07, Robert Cummings [EMAIL PROTECTED] wrote:
I saw a bunch of bad examples given to you that completely ignore any
available locale information... so here's a better version:
I seem to have missed the part of the question where it said
considering locale was important.
--
Greg Donald
On Tue, 2007-05-22 at 12:58 -0500, Greg Donald wrote:
On 5/22/07, Robert Cummings [EMAIL PROTECTED] wrote:
I saw a bunch of bad examples given to you that completely ignore any
available locale information... so here's a better version:
I seem to have missed the part of the question where
On 5/22/07, Robert Cummings [EMAIL PROTECTED] wrote:
On Tue, 2007-05-22 at 12:58 -0500, Greg Donald wrote:
On 5/22/07, Robert Cummings [EMAIL PROTECTED] wrote:
I saw a bunch of bad examples given to you that completely ignore any
available locale information... so here's a better version:
On 5/22/07, Robert Cummings [EMAIL PROTECTED] wrote:
Nothing said it was important, but why implement a half-assed solution
when you can implement a superior solution in as much time?
Your solution contains overhead you don't even know you need. Coding
for locales is an edge case since most
On Tue, 2007-05-22 at 14:32 -0400, Daniel Brown wrote:
On 5/22/07, Robert Cummings [EMAIL PROTECTED] wrote:
On Tue, 2007-05-22 at 12:58 -0500, Greg Donald wrote:
On 5/22/07, Robert Cummings [EMAIL PROTECTED] wrote:
I saw a bunch of bad examples given to you that completely ignore any
On Tue, 2007-05-22 at 13:47 -0500, Greg Donald wrote:
On 5/22/07, Robert Cummings [EMAIL PROTECTED] wrote:
Nothing said it was important, but why implement a half-assed solution
when you can implement a superior solution in as much time?
Your solution contains overhead you don't even know
:: yawns ::
After all the bickering, I wouldn't be surprised if the OP never asks a
question here again.
--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107
On Tue, 2007-05-22 at 15:00 -0400, Daniel Brown wrote:
:: yawns ::
After all the bickering, I wouldn't be surprised if the OP never
asks a question here again.
Who's bickering? When did a simple discussion become bickering? Maybe
you should take a nap... you're obviously tired.
You amuse me, but it's not worth getting into a discussion over.
Enjoy the rest of your day!
--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107
On 5/22/07, Robert Cummings [EMAIL PROTECTED] wrote:
No, your solution is bloated. Mine may run a tad slower,
Two function calls wrapped in a function will be slower. Tad or a
lot, slower is still slower.
but it consumes
less memory since it uses the weekday names already defined in the
On Tue, 2007-05-22 at 17:13 -0500, Greg Donald wrote:
My solution stands as the best one, for memory usage and speed.
Please benchmark it so you will learn from this experience.
Yours is the least maintainable. I have nothing to learn from you that I
didn't learn in kindergarten.
Cheers,
On 5/22/07, Robert Cummings [EMAIL PROTECTED] wrote:
Yours is the least maintainable.
Hehe.. with 4 times as many lines of code and 160% more bytes of code overall?
cat locale.php|grep -v ^$|wc -l
16
cat simple.php|grep -v ^$|wc -l
4
ls -lavh
-rw-r--r--1 destiney
On Tue, 2007-05-22 at 17:54 -0500, Greg Donald wrote:
On 5/22/07, Robert Cummings [EMAIL PROTECTED] wrote:
Yours is the least maintainable.
Hehe.. with 4 times as many lines of code and 160% more bytes of code
overall?
cat locale.php|grep -v ^$|wc -l
16
cat simple.php|grep
On 5/22/07, Robert Cummings [EMAIL PROTECTED] wrote:
They didn't teach PHP where I attended kindergarten. Is that a Canadian
thing?
Exactly, and I'm not about to learn PHP from you now *lol*.
Next time you should say so up front, I would have spotted you 10% on
the benchmarks.
--
Greg
Hi,
Wednesday, May 23, 2007, 2:46:38 AM, you wrote:
BD How can I convert the numerical day of week to the string version?
BD Example, if the day of the week is 1 I would like to print out 'Sunday'.
BD
BD Thanks,
BD Dave
?php
$day =2;
//for a Monday start
echo gmdate('l',($day + 3) * 24 *
On Tue, 2007-05-22 at 19:17 -0500, Greg Donald wrote:
On 5/22/07, Robert Cummings [EMAIL PROTECTED] wrote:
They didn't teach PHP where I attended kindergarten. Is that a Canadian
thing?
Exactly, and I'm not about to learn PHP from you now *lol*.
Next time you should say so up
Mom! Dad! Stop fighting!
= = = Original message = = =
On 5/22/07, Robert Cummings [EMAIL PROTECTED] wrote:
Yours is the least maintainable.
Hehe.. with 4 times as many lines of code and 160% more bytes of code overall?
cat locale.php|grep -v ^$|wc -l
16
cat simple.php|grep -v
On Tue, 2007-05-22 at 21:13 -0400, [EMAIL PROTECTED] wrote:
Mom! Dad! Stop fighting!
In case anyone is wondering... I'm the Dad!! :)
Cheers,
Rob.
--
..
| InterJinn Application Framework - http://www.interjinn.com |
Em Terça 22 Maio 2007 22:39, Robert Cummings escreveu:
On Tue, 2007-05-22 at 21:13 -0400, [EMAIL PROTECTED] wrote:
Mom! Dad! Stop fighting!
In case anyone is wondering... I'm the Dad!! :)
Just read my sig... =)
Time to sleep... Good bye! =)
--
Davi Vidal
[EMAIL PROTECTED]
[EMAIL
35 matches
Mail list logo