need to find pro-rated price ($today - 2007-12-31) / (number of days in year)
I am trying to get a pro-rated subscription price based on when they sign up.
I order to get the number of days between today and the end of the year, I first have to know I need to get the number of days in THIS year - since there are leap years.
I think this code will work for getting the #days between now and end of year:
I still need help getting the # days in whatever year we are in.
$year_end = Year(date())."-12-31";
$date_diff = round( abs(strtotime(date('y-m-d'))-strtotime($year_end)) / 86400, 0 );
Any ideas besides calling the easy MySQL DATEDIFF() function?
($date_diff/(total number of days this year)) * pricing