<?php
$dateStr = "(Tue 7:00AM EST)";
$date = \DateTime::createFromFormat("(D g:iA T", $dateStr);
var_dump($date);
- Output for 5.6.28, 7.0.12 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.12 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.7
- object(DateTime)#1 (3) {
["date"]=>
string(26) "2014-01-21 07:00:00.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
string(3) "EST"
}
- Output for 5.5.24 - 5.5.25, 5.6.8 - 5.6.9, 5.6.21, 7.0.6
- object(DateTime)#1 (3) {
["date"]=>
string(26) "2016-05-03 07:00:00.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
string(3) "EST"
}
- Output for 5.5.30, 5.6.14, 7.0.5
- object(DateTime)#1 (3) {
["date"]=>
string(26) "2016-04-05 07:00:00.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
string(3) "EST"
}
- Output for 5.6.18, 7.0.4
- object(DateTime)#1 (3) {
["date"]=>
string(26) "2016-03-15 07:00:00.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
string(3) "EST"
}
- Output for 5.5.31 - 5.5.32, 5.6.17, 7.0.2 - 7.0.3
- object(DateTime)#1 (3) {
["date"]=>
string(26) "2016-03-22 07:00:00.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
string(3) "EST"
}
- Output for 5.6.15 - 5.6.16, 7.0.0 - 7.0.1
- object(DateTime)#1 (3) {
["date"]=>
string(26) "2016-03-29 07:00:00.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
string(3) "EST"
}
- Output for 5.5.34, 5.6.20
- object(DateTime)#1 (3) {
["date"]=>
string(26) "2016-04-12 07:00:00.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
string(3) "EST"
}
- Output for 5.5.33, 5.6.19
- object(DateTime)#1 (3) {
["date"]=>
string(26) "2016-03-08 07:00:00.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
string(3) "EST"
}
- Output for 5.5.29, 5.6.12 - 5.6.13
- object(DateTime)#1 (3) {
["date"]=>
string(26) "2016-04-19 07:00:00.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
string(3) "EST"
}
- Output for 5.5.26 - 5.5.28, 5.6.10 - 5.6.11
- object(DateTime)#1 (3) {
["date"]=>
string(26) "2016-04-26 07:00:00.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
string(3) "EST"
}
- Output for 5.5.35, 5.6.7
- object(DateTime)#1 (3) {
["date"]=>
string(26) "2016-05-24 07:00:00.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
string(3) "EST"
}
- Output for 5.4.44 - 5.4.45
- object(DateTime)#1 (3) {
["date"]=>
string(26) "2015-10-27 07:00:00.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
string(3) "EST"
}
- Output for 5.4.39 - 5.4.43
- object(DateTime)#1 (3) {
["date"]=>
string(26) "2015-07-14 07:00:00.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
string(3) "EST"
}
- Output for 5.4.38
- object(DateTime)#1 (3) {
["date"]=>
string(26) "2015-03-03 07:00:00.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
string(3) "EST"
}
- Output for 5.4.36 - 5.4.37
- object(DateTime)#1 (3) {
["date"]=>
string(26) "2015-02-10 07:00:00.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
string(3) "EST"
}
- Output for 5.4.34 - 5.4.35
- object(DateTime)#1 (3) {
["date"]=>
string(26) "2014-11-18 07:00:00.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
string(3) "EST"
}
- Output for 5.4.31 - 5.4.32
- object(DateTime)#1 (3) {
["date"]=>
string(26) "2014-09-09 07:00:00.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
string(3) "EST"
}
- Output for 5.4.30
- object(DateTime)#1 (3) {
["date"]=>
string(26) "2014-07-01 07:00:00.000000"
["timezone_type"]=>
int(2)
["timezone"]=>
string(3) "EST"
}
- Output for 5.3.6 - 5.3.28, 5.4.0 - 5.4.29
- object(DateTime)#1 (3) {
["date"]=>
string(19) "2014-07-01 07:00:00"
["timezone_type"]=>
int(2)
["timezone"]=>
string(3) "EST"
}
- Output for 5.3.29
- object(DateTime)#1 (3) {
["date"]=>
string(19) "2014-09-09 07:00:00"
["timezone_type"]=>
int(2)
["timezone"]=>
string(3) "EST"
}
preferences:
172.53 ms | 401 KiB | 257 Q