-2

I'm trying to build my agenda in php, using strtotime to return dates based on what wants the user, but I observe an understood issue whith strtotime!

When I say Fisrt Monday of Septembre 2014 it gives me 08 September. normaly it should return 01 September!

What do you think?

<?php
$j = strtotime("First Monday Septembre 2014");
echo date('d F',$j);
?>

the same problem on

<?php
$j = strtotime("First Monday July 2013");
echo date('d F',$j);
?>

otherwise when the day is not the first on the month it gives you the right day

Vini.g.fer
  • 11,639
  • 16
  • 61
  • 90
  • possible duplicate of [The first day of the current month in php using date\_modify as DateTime object](http://stackoverflow.com/questions/2094797/the-first-day-of-the-current-month-in-php-using-date-modify-as-datetime-object) – RichardBernards Nov 21 '14 at 10:52
  • possible duplicate http://stackoverflow.com/questions/7724954/php-strtotime-first-monday-february-returns-second-monday-if-february-1st-is – Mrlitty Nov 21 '14 at 10:53

1 Answers1

1

$j = strtotime("first monday of september 2014"); echo date('d F',$j);

Above code will return result as "01 September".

Try it and let me know if you face any error.

Best Luck