A
A
Alexey Karpan2016-11-03 11:51:51
PHP
Alexey Karpan, 2016-11-03 11:51:51

How to recognize date string and convert it to Date?

We parse the string with the release date of the announcement on the board.
Example: "17:01 today" or "23:51 yesterday" or "17:01 November 1".
How to convert this value to Date type?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Taratin, 2016-11-03
@dvguinf

You can rewrite under PHP https://habrahabr.ru/post/204628/

V
Vladimir, 2016-11-03
@br3t

Are you unable to write the regular expression itself or what is the problem?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question