Q
Q
Qwer1i2016-02-14 13:36:23
PHP
Qwer1i, 2016-02-14 13:36:23

How to find out the last Monday of the month, 2nd Wednesday of the month, etc in PHP?

I make schedules for the site. Sanitary days must be taken into account.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Kostyuk, 2016-02-14
@Mayzer

Might be useful:

print date('d.m.Y', strtotime("last Monday")); // 25.12.2006
print "\n";
print date('d.m.Y', strtotime("Monday")); // 01.01.2007
print "\n";
print date('d.m.Y', strtotime("next Monday")); // 08.01.2007

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question