Piranha wrote:I suggest that you use [man]mktime[/man] or [man]date[/man] and check with a if-statement.
Here's the thing, and I'm not sure how this would work with mktime(), and that's that the year is going to be irrelevant -- perhaps if I provide more details:
Here are three ranges:
Range 1: 8.16 - 12.31
Range 2: 1.1 - 5.20
Range 3: 5.21 - 8.15
So, I started off with something along these lines:
$curMonth = date('m');
$curDay = date('j');
if($curMonth >= 8 && $curMonth <= 12)
{
}
elseif($curMonth >= 1 && $curMonth <= 5)
{
}
elseif($curMonth >= 5 && $curMonth <= 8)
{
}
And it's within here, that I get stuck -- looking at it here, I can probably stick in more conditions (let's say with Range 3), if the month is 6-7, that's fine, but if it's 5, it has to be >= 21 and if it's 8 it has to be <= 15. I suppose I'm just trying to see if there's a more... elegant way to do this that I'm missing?
Thanks,
Rob