Re: Calendar Problem
| From: | Robert Cummings | Date: | Tue, 11 Aug 2009 20:39:59 +0000 |
| Subject: | Re: Calendar Problem | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-296675@lists.php.net to get a copy of this message | ||
Jim Lucas wrote:
Robert Cummings wrote:Yes... in a superfluous hold-my-hand sort of way :) Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHPtedd wrote:man, please use some parenthesis... my translation of the above would be the following: $mod = (($i < 0) ? $i : ('+'.$i)); would that be correct?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 $fridays = array(); for( $i = -30; $i <= 30; $i++ ) {$mod = $i < 0 ? $i : '+'.$i;