Re: [PHP] Calendar Problem

2009-08-12 Thread Martin Scotta
On Wed, Aug 12, 2009 at 12:07 PM, tedd wrote: > At 9:50 AM -0500 8/12/09, Shawn McKenzie wrote: > >> tedd wrote: >> >>> >>> Your solution had 61 iterations (for loop) while mind had only 21, so >>> mine's a bit faster. Here's the comparison: >>> >>> http://php1.net/b/fridays/ >>> >>> But I'll

Re: [PHP] Calendar Problem

2009-08-12 Thread tedd
At 9:50 AM -0500 8/12/09, Shawn McKenzie wrote: tedd wrote: Your solution had 61 iterations (for loop) while mind had only 21, so mine's a bit faster. Here's the comparison: http://php1.net/b/fridays/ But I'll use your solution -- it's more elegant. Thanks for the code, tedd Actual

Re: [PHP] Calendar Problem

2009-08-12 Thread tedd
At 3:26 PM +0100 8/12/09, Stuart wrote: 2009/8/12 tedd : At 4:08 PM -0400 8/11/09, Robert Cummings wrote: I think Shawn McKenzie's is the best. It seems his would take at most 12 iterations. Cheers, Rob. Rob: For some reason I did not see/consider Shawn's solutions -- sorry Shawn.

Re: [PHP] Calendar Problem

2009-08-12 Thread Shawn McKenzie
tedd wrote: > > Your solution had 61 iterations (for loop) while mind had only 21, so > mine's a bit faster. Here's the comparison: > > http://php1.net/b/fridays/ > > But I'll use your solution -- it's more elegant. > > Thanks for the code, > > tedd > Actually, if you refresh your page you h

Re: [PHP] Calendar Problem

2009-08-12 Thread tedd
At 11:03 AM -0300 8/12/09, Martin Scotta wrote: Hi all This is my point of view. I try to stay the most legible and simple as possible. @tedd: can you benchmark this script too? usualy legibility > performance Martin: It's included here: http://php1.net/b/fridays/ Works great -- thanks.

Re: [PHP] Calendar Problem

2009-08-12 Thread Stuart
2009/8/12 tedd : >>> At 4:08 PM -0400 8/11/09, Robert Cummings wrote: >> >> I think Shawn McKenzie's is the best. It seems his would take at most 12 >> iterations. >> >> Cheers, >> Rob. > > Rob: > > For some reason I did not see/consider Shawn's solutions -- sorry Shawn. > > However, it appears tha

Re: [PHP] Calendar Problem

2009-08-12 Thread Martin Scotta
On Wed, Aug 12, 2009 at 10:25 AM, Robert Cummings wrote: > > > tedd wrote: > >> At 4:08 PM -0400 8/11/09, Robert Cummings wrote: >> >>> tedd wrote: >>> Hi gang: I want to show the dates for all Fridays +-30 days from a specific date. For example, given today's date (8/11/2

Re: [PHP] Calendar Problem

2009-08-12 Thread tedd
At 4:08 PM -0400 8/11/09, Robert Cummings wrote: I think Shawn McKenzie's is the best. It seems his would take at most 12 iterations. Cheers, Rob. Rob: For some reason I did not see/consider Shawn's solutions -- sorry Shawn. However, it appears that mine is still the fastest in most test.

Re: [PHP] Calendar Problem

2009-08-12 Thread Robert Cummings
tedd wrote: At 4:08 PM -0400 8/11/09, Robert Cummings wrote: tedd wrote: Hi gang: I want to show the dates for all Fridays +-30 days from a specific date. For example, given today's date (8/11/2009) the Fridays that fall +-30 days are July 17, July 24, July 31, Aug 7, Aug 14, Aug 21, Aug

Re: [PHP] Calendar Problem

2009-08-12 Thread tedd
At 4:08 PM -0400 8/11/09, Robert Cummings wrote: tedd wrote: Hi gang: I want to show the dates for all Fridays +-30 days from a specific date. For example, given today's date (8/11/2009) the Fridays that fall +-30 days are July 17, July 24, July 31, Aug 7, Aug 14, Aug 21, Aug 28, and Sept 4.

Re: [PHP] Calendar Problem

2009-08-11 Thread Paul M Foster
On Tue, Aug 11, 2009 at 03:53:58PM -0400, tedd wrote: > Hi gang: > > I want to show the dates for all Fridays +-30 days from a specific date. > > For example, given today's date (8/11/2009) the Fridays that fall > +-30 days are July 17, July 24, July 31, Aug 7, Aug 14, Aug 21, Aug > 28, and Sept 4

Re: [PHP] Calendar Problem

2009-08-11 Thread Robert Cummings
Jim Lucas wrote: Robert Cummings wrote: tedd wrote: Hi gang: I want to show the dates for all Fridays +-30 days from a specific date. For example, given today's date (8/11/2009) the Fridays that fall +-30 days are July 17, July 24, July 31, Aug 7, Aug 14, Aug 21, Aug 28, and Sept 4. I'm cu

Re: [PHP] Calendar Problem

2009-08-11 Thread Jim Lucas
Robert Cummings wrote: > tedd wrote: >> Hi gang: >> >> I want to show the dates for all Fridays +-30 days from a specific date. >> >> For example, given today's date (8/11/2009) the Fridays that fall +-30 >> days are July 17, July 24, July 31, Aug 7, Aug 14, Aug 21, Aug 28, and >> Sept 4. >> >> I'm

Re: [PHP] Calendar Problem

2009-08-11 Thread Robert Cummings
tedd wrote: Hi gang: I want to show the dates for all Fridays +-30 days from a specific date. For example, given today's date (8/11/2009) the Fridays that fall +-30 days are July 17, July 24, July 31, Aug 7, Aug 14, Aug 21, Aug 28, and Sept 4. I'm curious, how would you guys solve this?

[PHP] Calendar Problem

2009-08-11 Thread tedd
Hi gang: I want to show the dates for all Fridays +-30 days from a specific date. For example, given today's date (8/11/2009) the Fridays that fall +-30 days are July 17, July 24, July 31, Aug 7, Aug 14, Aug 21, Aug 28, and Sept 4. I'm curious, how would you guys solve this? Cheers, tedd -

RE: [PHP] Calendar problem

2003-01-15 Thread John W. Holmes
> I have two fields in my form. When two dates are entered in these two > boxes, I need to find the diiference in calendar months and remaining days > between these two dates. This "Calendar months and remaining days" is > important. The functions that I know do not work for calendar months. > Can

[PHP] Calendar problem

2003-01-14 Thread menezesd
Hello friends. I have two fields in my form. When two dates are entered in these two boxes, I need to find the diiference in calendar months and remaining days between these two dates. This "Calendar months and remaining days" is important. The functions that I know do not work for calendar mo