1--TEST--
2Test fix for DateTime when date have textual day with dot or other special char at end
3--FILE--
4<?php
5
6//Set the default time zone
7date_default_timezone_set('Europe/London');
8
9echo "*** Testing clone on DateTime objects ***\n";
10
11// Create a DateTime object..
12$orig = new DateTime('2012-11-29 17:00:00');
13
14// String to parse
15$string = "Thu., Nov. 29, 2012 5:00PM";
16
17// Create a DateTime object from format
18$fromFormat = DateTime::createFromFormat( "D., M# j, Y g:iA", $string );
19
20echo "Format method: " . $orig->format("D., M. j, Y g:iA") . "\n";
21echo "createFromFormat method: " . $fromFormat->format("D., M. j, Y g:iA") . "\n";
22
23?>
24--EXPECT--
25*** Testing clone on DateTime objects ***
26Format method: Thu., Nov. 29, 2012 5:00PM
27createFromFormat method: Thu., Nov. 29, 2012 5:00PM
28