Re: [PHP] Week Days

2005-08-20 Thread Robert Cummings
On Sat, 2005-08-20 at 03:15, [EMAIL PROTECTED] wrote: > Rob, > > I tried your code below, but it didn't work. I put the number of week days > in $addWeekdays variable. Am I doing something wrong or is there an error in > the code? Appreciate your help! There's an error... I didn't account for

Re: [PHP] Week Days

2005-08-20 Thread [EMAIL PROTECTED]
Rob, This code works great! Thank you for all of your help and everyone else who responded! On 8/18/05, Robert Cummings <[EMAIL PROTECTED]> wrote: > > On Fri, 2005-08-19 at 02:10, Jasper Bryant-Greene wrote: > > [EMAIL PROTECTED] wrote: > > > I am trying to add 3 (or a user-defined amount) w

Re: [PHP] Week Days

2005-08-20 Thread [EMAIL PROTECTED]
Rob, I tried your code below, but it didn't work. I put the number of week days in $addWeekdays variable. Am I doing something wrong or is there an error in the code? Appreciate your help! On 8/18/05, Robert Cummings <[EMAIL PROTECTED]> wrote: > > On Fri, 2005-08-19 at 02:17, Robert Cummings

Re: [PHP] Week Days

2005-08-19 Thread Robert Cummings
On Sat, 2005-08-20 at 00:00, Richard Lynch wrote: > On Thu, August 18, 2005 10:57 pm, [EMAIL PROTECTED] wrote: > > I am trying to add 3 (or a user-defined amount) week days to a certain > > date.. > > An example is today 2005-08-18 then adding 3 week days to give me a > > date of > > 2005-08-23. I

Re: [PHP] Week Days

2005-08-19 Thread Richard Lynch
On Thu, August 18, 2005 10:57 pm, [EMAIL PROTECTED] wrote: > I am trying to add 3 (or a user-defined amount) week days to a certain > date.. > An example is today 2005-08-18 then adding 3 week days to give me a > date of > 2005-08-23. I have tried searching online but cannot find an easy way > of >

Re: [PHP] Week Days

2005-08-19 Thread Philip Hallstrom
Easy enough to change that date(...mktime(...)) command above to return the weekday and while the weekday is a weekend just add a day and repeat. Actually sorry to post again on the same post, but this is like the first solution posted and is invalid since it doesn't account for non-weekdays tha

Re: [PHP] Week Days

2005-08-19 Thread Robert Cummings
On Fri, 2005-08-19 at 13:47, Philip Hallstrom wrote: > >> All you need is the mktime() command. > >> > >> do something like: > >> $futureDate = date("Y-m-d", mktime(0, 0, 0, $month, $today+ > >> $daysToAdd, $year)); > >> > >> Jordan > >> > >> > >> http://www.php.net/mktime > >> mktime() is useful f

Re: [PHP] Week Days

2005-08-19 Thread Robert Cummings
On Fri, 2005-08-19 at 13:47, Philip Hallstrom wrote: > >> All you need is the mktime() command. > >> > >> do something like: > >> $futureDate = date("Y-m-d", mktime(0, 0, 0, $month, $today+ > >> $daysToAdd, $year)); > >> > >> Jordan > >> > >> > >> http://www.php.net/mktime > >> mktime() is useful f

Re: [PHP] Week Days

2005-08-19 Thread Philip Hallstrom
All you need is the mktime() command. do something like: $futureDate = date("Y-m-d", mktime(0, 0, 0, $month, $today+ $daysToAdd, $year)); Jordan http://www.php.net/mktime mktime() is useful for doing date arithmetic and validation, as it will automatically calculate the correct value for out-o

Re: [PHP] Week Days

2005-08-19 Thread Robert Cummings
On Fri, 2005-08-19 at 11:17, Jordan Miller wrote: > Yo, > > All you need is the mktime() command. > > do something like: > $futureDate = date("Y-m-d", mktime(0, 0, 0, $month, $today+ > $daysToAdd, $year)); > > Jordan > > > http://www.php.net/mktime > mktime() is useful for doing date arithmet

Re: [PHP] Week Days

2005-08-19 Thread Jordan Miller
Yo, All you need is the mktime() command. do something like: $futureDate = date("Y-m-d", mktime(0, 0, 0, $month, $today+ $daysToAdd, $year)); Jordan http://www.php.net/mktime mktime() is useful for doing date arithmetic and validation, as it will automatically calculate the correct value

Re: [PHP] Week Days

2005-08-18 Thread Robert Cummings
On Fri, 2005-08-19 at 02:17, Robert Cummings wrote: > This doesn't work since the value can be user defined and thus may span > multiple weeks :) The following works but is dirty, I'm sure there's a > better solution using modulus operator and adding and subtracting and a > little voodoo... I'm jus

Re: [PHP] Week Days

2005-08-18 Thread Robert Cummings
On Fri, 2005-08-19 at 02:10, Jasper Bryant-Greene wrote: > [EMAIL PROTECTED] wrote: > > I am trying to add 3 (or a user-defined amount) week days to a certain > > date.. > > An example is today 2005-08-18 then adding 3 week days to give me a date of > > 2005-08-23. I have tried searching online

Re: [PHP] Week Days

2005-08-18 Thread Jasper Bryant-Greene
[EMAIL PROTECTED] wrote: I am trying to add 3 (or a user-defined amount) week days to a certain date.. An example is today 2005-08-18 then adding 3 week days to give me a date of 2005-08-23. I have tried searching online but cannot find an easy way of doing so. $numDaysToAdd = 3; $s = ($numDa

[PHP] Week Days

2005-08-18 Thread [EMAIL PROTECTED]
I am trying to add 3 (or a user-defined amount) week days to a certain date.. An example is today 2005-08-18 then adding 3 week days to give me a date of 2005-08-23. I have tried searching online but cannot find an easy way of doing so.