New constants in DateTime
| From: | Crocodile | Date: | Thu, 02 Mar 2017 14:48:31 +0000 |
| Subject: | New constants in DateTime | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-98377@lists.php.net to get a copy of this message | ||
Hello internals,
A similar question should have been asked already but I haven't found
anything so far when googling: I think DateTime class should have the
following constants in addition to those already existing:
const SQL = "Y-m-d H:i:s";
const SQL_DATE = "Y-m-d";
const SQL_TIME = "H:i:s";
const SECOND = 1;
const MINUTE = 60;
const HOUR = 3600;
const DAY = 86400;
Easy-to-make feature that will be useful to a lot of PHP devs, I believe.
The exact naming of SQL_* constants is subject to dsicuss.
Best regards,
Victor
--
Best regards,
Victor Bolshov