PHP's strtotime() uses the current year by default. How to get only future dates?
echo date('l d. M Y', strtotime('first sunday of april')); // Sunday 03. Apr 2016
I can't manage to get the next first Sunday of April. The date must not be in the past and it must be always relative (no 2017 or 2018 hardcoded).
echo date('l d. M Y', strtotime('first sunday of next april')); // fails
echo date('l d. M Y', strtotime('first sunday of april next year')); // wrong from January until that Sunday in April
I think I could do it in multiple steps or create a function to check, if current time is before/after the first Sunday and insert a 'next year' at the end.
But I was wondering if there is a simple solution with strtotime()