php - strtotime() and easter_date() won't work together -


i'm trying day after easter date:

date("d-m-y", strtotime(easter_date(), '+1 day')); 

i don't understand, date showed still same, when try this:

date("d-m-y", strtotime('+1 day')); 

it works.

how can do?

that's because easter_date() produces unix timestamp:

1364713200

and strtotime() meant 'today' , 'tuesday next week';

if want add day it, add 86400 (this how many seconds in day) easter_date();

so: date("d-m-y", easter_date() + 86400);


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -