2

I have a date which is:

$firstDay = "'" . date('m-d', easter_date(date('Y'))) . "'";

Output of $firstDay is: '04-16'. Now I need to create a second variable and add 1 day to the $firstDay variable. How should I do that? I red that I can do with $date->modify(), I'm trying like so:

$secondDay = $firstEasterDay->modify('+1 day'); 

But this doesn't work and I got an error.

Thanks for any help.

HarryFlopper
  • 195
  • 1
  • 2
  • 10
  • Without a given year there's no clear answer for the end of February! In a leap year there's one more day in February than in other years. How does that factor into this task? – deceze Sep 29 '17 at 10:54

1 Answers1

1
<?php
$date = "04-15-2013";
$date = strtotime($date);
$date = strtotime("+1 day", $date);
echo date('m-d-Y', $date);?> 

Try This

Parth Sureliya
  • 255
  • 5
  • 19