tags:

views:

45

answers:

1

Hello , i have a situation where i know the start date and the durration of an event in days , how can i calculate the end date ? i found topics on how to calculate the duration between two dates but nothing in my case Thanks in advance .

+2  A: 

date(strtotime("+" .durationInDays." days")[,startDate])

schubySteve
Not meaning to be rude , but your answer has an error , the second date() parameter is useless unless you are doing some calculation back in time eg. for last year :) date('Y-m-d',strtotime("+" .$durationInDays." days"));
Aviatrix
should be fixed then.
schubySteve