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 g
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
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 tak
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 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');
ech
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. Somet
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 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-as
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 mu
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
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 |
:---
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 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 s
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
http://www.php.net/)
To unsubscribe, visit: http://www.php.net/un
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
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 si
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 de
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,
R
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
lo
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 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.
:: 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 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 ev
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 complete
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 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 v
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 questio
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 Donal
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 informatio
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";
On 5/22/07, Daniel Brown <[EMAIL PROTECTED]> wrote:
PHP does automatic type conversions, even if $num is passed in as a
string all those quotes around the integers are not necessary. There
is no variable interpolation required in the day names so all those
double quotes should be single quote
*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 of week to the string version?
Example, if the day of
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 =
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[
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
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
**
HTC Disclaimer: The information contained in this message may b
36 matches
Mail list logo