Home
last modified time | relevance | path

Searched refs:DateTimeImmutable (Results 1 – 25 of 84) sorted by relevance

1234

/php-src/ext/date/tests/
H A DDateTimeImmutable_constants.phpt2 DateTimeImmutable constants
7 DATE_ATOM === DateTimeImmutable::ATOM,
8 DATE_COOKIE === DateTimeImmutable::COOKIE,
9 DATE_ISO8601 === DateTimeImmutable::ISO8601,
11 DATE_RFC822 === DateTimeImmutable::RFC822,
12 DATE_RFC850 === DateTimeImmutable::RFC850,
13 DATE_RFC1036 === DateTimeImmutable::RFC1036,
14 DATE_RFC1123 === DateTimeImmutable::RFC1123,
15 DATE_RFC7231 === DateTimeImmutable::RFC7231,
19 DATE_RSS === DateTimeImmutable::RSS,
[all …]
H A DDatePeriod_set_state_exception.phpt8 …' => new \DateTimeImmutable("2023-01-13 12:29:30"), 'end' => new \DateTimeImmutable("2023-01-16 16…
17 … "2023-01-13 12:29:30", 'end' => new \DateTimeImmutable("2023-01-16 16:49:29"), 'current' => new \
21 …'start' => new \DateTimeImmutable("2023-01-13 12:29:30"), 'end' => "2023-01-16 16:49:29", 'current…
25 …'start' => new \DateTimeImmutable("2023-01-13 12:29:30"), 'end' => new \DateTimeImmutable("2023-01…
29 …' => new \DateTimeImmutable("2023-01-13 12:29:30"), 'end' => new \DateTimeImmutable("2023-01-16 16…
33 …' => new \DateTimeImmutable("2023-01-13 12:29:30"), 'end' => new \DateTimeImmutable("2023-01-16 16…
37 …' => new \DateTimeImmutable("2023-01-13 12:29:30"), 'end' => new \DateTimeImmutable("2023-01-16 16…
41 …' => new \DateTimeImmutable("2023-01-13 12:29:30"), 'end' => new \DateTimeImmutable("2023-01-16 16…
H A DDateTimeImmutable_createFromInterface-001.phpt2 Tests for DateTimeImmutable::createFromInterface
9 $i = DateTimeImmutable::createFromInterface( date_create( $current ) );
12 $i = DateTimeImmutable::createFromInterface( date_create_immutable( $current ) );
17 $i = DateTimeImmutable::createFromInterface( date_create( $current ) );
25 $i = DateTimeImmutable::createFromInterface( date_create( $current ) );
32 object(DateTimeImmutable)#%d (3) {
40 object(DateTimeImmutable)#%d (3) {
48 object(DateTimeImmutable)#%d (3) {
56 object(DateTimeImmutable)#%d (3) {
64 object(DateTimeImmutable)#%d (3) {
[all …]
H A DcreateFromTimestamp.phpt70 DateTimeImmutable::createFromTimestamp(1696883232): object(DateTimeImmutable)#%d (3) {
86 DateTimeImmutable::createFromTimestamp(-1696883232): object(DateTimeImmutable)#%d (3) {
102 DateTimeImmutable::createFromTimestamp(1696883232.013981): object(DateTimeImmutable)#%d (3) {
118 DateTimeImmutable::createFromTimestamp(-1696883232.013981): object(DateTimeImmutable)#%d (3) {
134 DateTimeImmutable::createFromTimestamp(0.123456): object(DateTimeImmutable)#%d (3) {
150 DateTimeImmutable::createFromTimestamp(-0.123456): object(DateTimeImmutable)#%d (3) {
166 DateTimeImmutable::createFromTimestamp(0): object(DateTimeImmutable)#%d (3) {
182 DateTimeImmutable::createFromTimestamp(0.0): object(DateTimeImmutable)#%d (3) {
198 DateTimeImmutable::createFromTimestamp(-0.0): object(DateTimeImmutable)#%d (3) {
224 DateTimeImmutable::createFromTimestamp(1599828571.235628): object(DateTimeImmutable)#%d (3) {
[all …]
H A DcreateFromTimestamp_32bit.phpt31 echo 'DateTimeImmutable::createFromTimestamp(' . var_export($ts, true) . '): ';
33 var_dump(DateTimeImmutable::createFromTimestamp($ts));
49 DateTimeImmutable::createFromTimestamp(2147483647): object(DateTimeImmutable)#%d (3) {
65 DateTimeImmutable::createFromTimestamp(-2147483647-1): object(DateTimeImmutable)#%d (3) {
81 DateTimeImmutable::createFromTimestamp(2147483647.5): object(DateTimeImmutable)#%d (3) {
97 DateTimeImmutable::createFromTimestamp(-2147483647.5): object(DateTimeImmutable)#%d (3) {
113 DateTimeImmutable::createFromTimestamp(2147483646.5): object(DateTimeImmutable)#%d (3) {
122 DateTimeImmutable::createFromTimestamp(-2147483648.5): DateRangeError: DateTimeImmutable::createFro…
124 DateTimeImmutable::createFromTimestamp(2147484671.0): DateRangeError: DateTimeImmutable::createFrom…
126 DateTimeImmutable::createFromTimestamp(-2147484673.0): DateRangeError: DateTimeImmutable::createFro…
H A DDateTimeImmutable_set_state_exception.phpt2 DateTimeImmutable invalid serialization data
21 $d = DateTimeImmutable::__set_state( $propertySet );
31 Error: Invalid serialization data for DateTimeImmutable object
32 Error: Invalid serialization data for DateTimeImmutable object
33 Error: Invalid serialization data for DateTimeImmutable object
34 Error: Invalid serialization data for DateTimeImmutable object
35 Error: Invalid serialization data for DateTimeImmutable object
36 Error: Invalid serialization data for DateTimeImmutable object
37 Error: Invalid serialization data for DateTimeImmutable object
38 Error: Invalid serialization data for DateTimeImmutable object
H A DDateTimeImmutable_uninitialised_exceptions.phpt7 class MyDateTimeImmutable extends DateTimeImmutable
24 $dt = new DateTimeImmutable();
28 check(fn() => DateTimeImmutable::createFromInterface($mdti));
55 DateObjectError: Object of type MyDateTimeImmutable (inheriting DateTimeImmutable) has not been cor…
56 DateObjectError: Object of type MyDateTimeImmutable (inheriting DateTimeImmutable) has not been cor…
57 DateObjectError: Object of type MyDateTimeImmutable (inheriting DateTimeImmutable) has not been cor…
58 DateObjectError: Object of type MyDateTimeImmutable (inheriting DateTimeImmutable) has not been cor…
59 DateObjectError: Object of type MyDateTimeImmutable (inheriting DateTimeImmutable) has not been cor…
60 DateObjectError: Object of type MyDateTimeImmutable (inheriting DateTimeImmutable) has not been cor…
61 DateObjectError: Object of type MyDateTimeImmutable (inheriting DateTimeImmutable) has not been cor…
[all …]
H A Dbug72719.phpt5 echo (new DateTimeImmutable('Monday next week 13:00'))->format('l'), "\n";
6 echo (new DateTimeImmutable('Tuesday next week 14:00'))->format('l'), "\n";
7 echo (new DateTimeImmutable('Wednesday next week 14:00'))->format('l'), "\n";
8 echo (new DateTimeImmutable('Thursday next week 15:00'))->format('l'), "\n";
9 echo (new DateTimeImmutable('Friday next week 16:00'))->format('l'), "\n";
10 echo (new DateTimeImmutable('Saturday next week 17:00'))->format('l'), "\n";
11 echo (new DateTimeImmutable('Sunday next week 18:00'))->format('l'), "\n";
H A DDateTimeImmutable_createFromMutable-001.phpt2 Tests for DateTimeImmutable::createFromMutable
9 $i = DateTimeImmutable::createFromMutable( date_create( $current ) );
13 DateTimeImmutable::createFromMutable( date_create_immutable( $current ) );
19 object(DateTimeImmutable)#%d (3) {
27 TypeError: DateTimeImmutable::createFromMutable(): Argument #1 ($object) must be of type DateTime,
H A DgetSetMicroseconds.phpt7 class MyDateTimeImmutable extends DateTimeImmutable {};
17 $dti = new DateTimeImmutable('2023-04-05T06:07:08.901234+00:00');
79 DateTimeImmutable::getMicrosecond(): 901234
80 object(DateTimeImmutable)#%d (3) {
116 DateTimeImmutable::setMicrosecond(0): object(DateTimeImmutable)#%d (3) {
124 DateTimeImmutable::getMicrosecond(): 901234
153 DateTimeImmutable::setMicrosecond(999999): object(DateTimeImmutable)#%d (3) {
161 DateTimeImmutable::getMicrosecond(): 901234
183 DateTimeImmutable::setMicrosecond(-1): DateRangeError: DateTimeImmutable::setMicrosecond(): Argumen…
184 DateTimeImmutable::getMicrosecond(): 901234
[all …]
H A Dbug80047.phpt2 Bug #80047: DatePeriod doesn't support custom DateTimeImmutable
8 class CustomDateTimeImmutable extends DateTimeImmutable {}
11 $dti = new DateTimeImmutable('2022-06-24');
36 DateTimeImmutable
37 DateTimeImmutable
38 DateTimeImmutable
39 DateTimeImmutable
H A DDateTimeImmutable_serialization.phpt2 Test DateTimeImmutable::__serialize and DateTimeImmutable::__unserialize
8 $d = new DateTimeImmutable("2022-04-14 11:27:42");
24 $d = new DateTimeImmutable;
55 object(DateTimeImmutable)#%d (%d) {
66 string(135) "O:17:"DateTimeImmutable":3:{s:4:"date";s:26:"2022-04-14 11:27:42.000000";s:13:"timezon…
70 object(DateTimeImmutable)#%d (%d) {
92 object(DateTimeImmutable)#%d (%d) {
103 object(DateTimeImmutable)#%d (%d) {
111 object(DateTimeImmutable)#%d (%d) {
H A Dbug78751.phpt2 Bug #78751 (Serialising DatePeriod converts DateTimeImmutable)
5 $oDay = new DateTimeImmutable('2019-10-25');
10 $oDays->start instanceof DateTimeImmutable,
11 $oDays->end instanceof DateTimeImmutable
H A DDateTime_compare.phpt2 DateTime/DateTimeImmutable compare handler
13 $DTI = new DateTimeImmutable("2023-01-16 17:09:08");
45 DateObjectError: Trying to compare an incomplete DateTime or DateTimeImmutable object
46 DateObjectError: Trying to compare an incomplete DateTime or DateTimeImmutable object
47 DateObjectError: Trying to compare an incomplete DateTime or DateTimeImmutable object
48 DateObjectError: Trying to compare an incomplete DateTime or DateTimeImmutable object
H A DDateTimeImmutable_createFromInterface_exceptions.phpt2 DateTimeImmutable::createFromInterface exception
14 class MyDateTimeImmutable extends DateTimeImmutable
23 $m = DateTimeImmutable::createFromInterface( $i );
30 $m = DateTimeImmutable::createFromInterface( $i );
37 DateObjectError: Object of type MyDateTimeImmutable (inheriting DateTimeImmutable) has not been cor…
H A DDateTimeImmutable_createFromMutable-002.phpt2 Tests for inherited DateTimeImmutable::createFromMutable
7 class MyDateTimeImmutable extends DateTimeImmutable {}
29 TypeError: DateTimeImmutable::createFromMutable(): Argument #1 ($object) must be of type DateTime,
H A Dgh9866.phpt6 \DateTimeImmutable $startDate,
7 \DateTimeImmutable $endDate,
13 $start = new \DateTimeImmutable('2000-11-01 09:29:22.907606', new \DateTimeZone('America/Chicago'));
14 $end = new \DateTimeImmutable('2022-06-06 11:00:00.000000', new \DateTimeZone('America/New_York'));
H A Dbug-gh8471.phpt9 $immutable = \DateTimeImmutable::createFromMutable($mutable);
19 $immutable = \DateTimeImmutable::createFromInterface($mutable);
25 $reflection = new ReflectionClass('\DateTimeImmutable');
35 $reflection = new ReflectionClass('\DateTimeImmutable');
49 Object of type DateTimeImmutable has not been correctly initialized by calling parent::__construct(…
50 Object of type DateTimeImmutable has not been correctly initialized by calling parent::__construct(…
H A Dbug65502.phpt2 Test for bug #65502: DateTimeImmutable::createFromFormat returns DateTime
9 echo get_class(DateTimeImmutable::createFromFormat('j-M-Y', '12-Sep-2013'));
12 DateTimeImmutable
H A Dbug80057.phpt2 Bug #80057 (DateTimeImmutable::createFromFormat() does not populate time)
5 $now = new DateTimeImmutable;
6 $parsed = DateTimeImmutable::createFromFormat('Y-m-d', '2020-09-04');
H A DDateTimeImmutable_modify_invalid_format.phpt2 DateTimeImmutable::modify() with invalid format
6 $datetime = new DateTimeImmutable;
15 DateMalformedStringException: DateTimeImmutable::modify(): Failed to parse time string () at positi…
H A Dgh9699.phpt2 Bug GH-9699 (DateTimeImmutable::diff differences in 8.1.10 onwards - timezone related)
6 $date = new DateTimeImmutable('2022-10-09 02:41:54.515330', new DateTimeZone('America/Los_Angeles')…
7 $now = new DateTimeImmutable('2022-10-10 08:41:54.534620', new DateTimeZone('UTC'));
H A DDatePeriod_serialize-002.phpt7 $s = new DateTimeImmutable("1978-12-22 09:15:00 Europe/Amsterdam");
8 $e = new DateTimeImmutable("2022-04-29 15:51:56 Europe/London");
35 object(DateTimeImmutable)#%d (%d) {
46 object(DateTimeImmutable)#%d (%d) {
87DateTimeImmutable":3:{s:4:"date";s:26:"1978-12-22 09:15:00.000000";s:13:"timezone_type";i:3;s:8:"t…
93 object(DateTimeImmutable)#%d (%d) {
104 object(DateTimeImmutable)#%d (%d) {
147 object(DateTimeImmutable)#%d (%d) {
158 object(DateTimeImmutable)#%d (%d) {
H A DDatePeriod_serialize-003.phpt7 $s = new DateTimeImmutable("1978-12-22 09:15:00 Europe/Amsterdam");
8 $e = new DateTimeImmutable("2022-04-29 15:51:56 Europe/London");
35 object(DateTimeImmutable)#%d (%d) {
46 object(DateTimeImmutable)#%d (%d) {
87DateTimeImmutable":3:{s:4:"date";s:26:"1978-12-22 09:15:00.000000";s:13:"timezone_type";i:3;s:8:"t…
93 object(DateTimeImmutable)#%d (%d) {
104 object(DateTimeImmutable)#%d (%d) {
147 object(DateTimeImmutable)#%d (%d) {
158 object(DateTimeImmutable)#%d (%d) {
/php-src/ext/intl/tests/
H A Ddateformat_format_relative.phpt30 function printFormat(int $dateFormat, int $timeFormat, DateTimeImmutable $time) {
42 function getToday(): DateTimeImmutable {
43 return new DateTimeImmutable();
46 function getYesterday(): DateTimeImmutable {
47 return new DateTimeImmutable("-1 day");
50 function getTomorrow(): DateTimeImmutable {
51 return new DateTimeImmutable("+1 day");
54 function getDayInPast(): DateTimeImmutable {
55 return new DateTimeImmutable("2020-01-20 20:20:20");

Completed in 31 milliseconds

1234