S
S
Sergey Zhuzhgov2022-02-16 18:17:34
PHP
Sergey Zhuzhgov, 2022-02-16 18:17:34

PHP relative dates. How to designate, for example, the third Tuesday of the month, or the last Thursday of the month, or the first Monday of the month?

Can you please tell me how to mark relative dates in the database and in PHP? For example, the holiday is celebrated on the second Sunday of December...
How to deal with such relative dates?

Thank you in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Aksentiev, 2022-02-16
@sergeyzhuzhgov

echo date('d.m.y', strtotime('third tuesday of this month'));

https://www.php.net/manual/ru/function.strtotime.php
https://www.php.net/manual/ru/datetime.formats.rel...
how to mark in base

What does it mean to mark dates in a database?
In advance, write down the necessary calculated in the right way

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question