Jump to content

php date confusion


samoht

Recommended Posts

hello again,

 

I have this variable that sets the date range to 1 month (actualy the end of the month):

$Num					= $TotalDays - substr($Date,6,2);
$NumDaysLater			= date('Ymd', strtotime($Date) + (60*60*24*$Num));
$AddQWhereEvents		= "eventdates.EventDate >= '$Date' AND eventdates.EventDate <= '$NumDaysLater'";

 

where Total days:

 

$TotalDays	= $_GET[Date] ? date('t',strtotime($_GET[Date])) : date('t');

 

I would like to do the same thing - but for a year. e.g. 365 or 364 days later.

 

Any ideas on how to do that?

Link to comment
https://forums.phpfreaks.com/topic/59623-php-date-confusion/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.