/PHP-8.2/ext/date/tests/ |
H A D | bug73489.phpt | 6 $datetime = new DateTime('2016-11-09 20:00:00', new DateTimeZone('UTC')); 7 var_dump($datetime->getTimestamp()); 8 $datetime->setTimeZone(new DateTimeZone('-03:00')); 9 $datetime->setTimeZone(new DateTimeZone('-03:00')); 10 var_dump($datetime->getTimestamp()); 13 $datetime = new DateTime('2016-11-09 20:00:00', new DateTimeZone('UTC')); 14 var_dump($datetime->getTimestamp()); 15 $datetime->setTimeZone(new DateTimeZone('-03:00')); 16 $datetime->getTimestamp(); 17 $datetime->setTimeZone(new DateTimeZone('-03:00')); [all …]
|
H A D | date_time_set_basic1.phpt | 11 $datetime = date_create("2009-01-31 15:14:10"); 13 echo "Initial date: " . date_format($datetime, DATE_RFC2822) . "\n"; 15 date_time_set($datetime, 17, 20); 16 echo "After modification1 " . date_format($datetime, DATE_RFC2822) . "\n"; 18 date_time_set($datetime, 19, 05, 59); 19 echo "After modification2 " . date_format($datetime, DATE_RFC2822) . "\n"; 21 date_time_set($datetime, 24, 10); 22 echo "After modification3 " . date_format($datetime, DATE_RFC2822) . "\n"; 24 date_time_set($datetime, 47, 35, 47); 25 echo "After modification4 " . date_format($datetime, DATE_RFC2822) . "\n"; [all …]
|
H A D | DateTime_setTime_basic1.phpt | 11 $datetime = new DateTime("2009-01-31 15:14:10"); 13 echo "Initial date: " . $datetime ->format(DATE_RFC2822) . "\n"; 15 $datetime->setTime(17, 20); 16 echo "After modification1 " . $datetime ->format(DATE_RFC2822) . "\n"; 18 $datetime->setTime(19, 05, 59); 19 echo "After modification2 " . $datetime ->format(DATE_RFC2822) . "\n"; 21 $datetime->setTime(24, 10); 22 echo "After modification3 " . $datetime ->format(DATE_RFC2822) . "\n"; 24 $datetime->setTime(47, 35, 47); 25 echo "After modification4 " . $datetime ->format(DATE_RFC2822) . "\n"; [all …]
|
H A D | date_modify_basic1.phpt | 11 $datetime = date_create("2009-01-31 14:28:41"); 13 date_modify($datetime, "+1 day"); 14 echo "After modification 1: " . date_format($datetime, "D, d M Y") . "\n"; 16 date_modify($datetime, "+1 week 2 days 4 hours 2 seconds"); 17 echo "After modification 2: " . date_format($datetime, "D, d M Y H:i:s") . "\n"; 19 date_modify($datetime, "next Thursday"); 20 echo "After modification 3: " . date_format($datetime, "D, d M Y") . "\n"; 22 date_modify($datetime, "last Sunday"); 23 echo "After modification 4: " . date_format($datetime, "D, d M Y") . "\n";
|
H A D | DateTime_modify_basic1.phpt | 11 $datetime = new DateTime("2009-01-31 14:28:41"); 13 $datetime->modify("+1 day"); 14 echo "After modification 1: " . $datetime->format("D, d M Y") . "\n"; 16 $datetime->modify("+1 week 2 days 4 hours 2 seconds"); 17 echo "After modification 2: " . $datetime->format("D, d M Y H:i:s") . "\n"; 19 $datetime->modify("next Thursday"); 20 echo "After modification 3: " . $datetime->format("D, d M Y") . "\n"; 22 $datetime->modify("last Sunday"); 23 echo "After modification 4: " . $datetime->format("D, d M Y") . "\n";
|
H A D | bug-gh11368.phpt | 2 Bug GH-11368: Date modify returns invalid datetime 8 $datetime = date_create('2023-06-04'); 10 $datetime->setTime(1,1,1,1 /* If set to any other number, it works fine */); 11 var_dump($datetime); 13 $datetime->modify('-100 ms'); 14 var_dump($datetime);
|
H A D | DateTime_setISODate_basic1.phpt | 11 $datetime = new DateTime("2009-01-30 17:57:32"); 14 $datetime->setISODate(2008, 40); 15 echo "Week 40 of 2009 is in \"" . $datetime->format("F") . "\"\n"; 18 $datetime->setISODate(2009, 30, 3); 19 echo "Week 30 day 3 of 2009 is \"" . $datetime->format("D M j") . "\"\n"; 22 $datetime->setISODate(2008, 30, 3); 23 echo "..same day last year was \"" . $datetime->format("D M j") . "\"\n";
|
H A D | date_isodate_set_basic1.phpt | 11 $datetime = date_create("2009-01-30 17:57:32"); 14 date_isodate_set($datetime, 2008, 40); 15 echo "Week 40 of 2009 is in \"" . date_format($datetime, "F") . "\"\n"; 18 date_isodate_set($datetime, 2009, 30, 3); 19 echo "Week 30 day 3 of 2009 is \"" . date_format($datetime, "D M j") . "\"\n"; 22 date_isodate_set($datetime, 2008, 30, 3); 23 echo "..same day last year was \"" . date_format($datetime, "D M j") . "\"\n";
|
H A D | gh11455.phpt | 7 string $datetime = "now", 11 parent::__construct($datetime, $timezone); 15 $datetime = new MyDateTimeImmutable('2022-12-22T11:26:00Z', myProperty: new stdClass); 16 $datetime->myProperty->field = str_repeat("hello", 3); 17 $serialized = serialize($datetime); 18 var_dump($datetime->myProperty);
|
H A D | date_timezone_set_basic1.phpt | 10 $datetime = date_create("2009-01-30 17:57:32"); 11 $tz = date_timezone_get($datetime); 14 $datetime = date_create("2009-01-30 22:57:32"); 17 date_timezone_set($datetime, $la_time); 18 $tz = date_timezone_get($datetime);
|
H A D | date_date_set_basic1.phpt | 10 $datetime = date_create("2009-01-30 19:34:10"); 12 echo date_format($datetime, DATE_RFC2822) . "\n"; 14 date_date_set($datetime, 2008, 02, 01); 16 echo date_format($datetime, DATE_RFC2822) . "\n";
|
H A D | DateTime_setDate_basic1.phpt | 10 $datetime = new DateTime("2009-01-30 19:34:10"); 12 echo $datetime->format(DATE_RFC2822) . "\n"; 14 $datetime->setDate(2008, 02, 01); 16 echo $datetime->format(DATE_RFC2822) . "\n";
|
H A D | gh10152.phpt | 8 string $datetime = "now", 12 parent::__construct($datetime, $timezone); 16 $datetime = new MyDateTimeImmutable('2022-12-22T11:26:00Z', myProperty: true); 17 $serialized = serialize($datetime);
|
H A D | DateTime_setTimezone_basic1.phpt | 10 $datetime = new DateTime("2009-01-30 17:57:32"); 11 echo "Default timezone: " . date_timezone_get($datetime)->getName() . "\n"; 14 $datetime->setTimezone($la_time); 15 echo "New timezone: " . date_timezone_get($datetime)->getName() . "\n";
|
H A D | bug79716.phpt | 5 $datetime = new \DateTimeImmutable( 9 \var_dump($datetime->format('j') === '0'); 10 \var_dump($datetime);
|
H A D | bug76770.phpt | 2 Bug #76770 'U' modifier in 'datetime::createFromFormat' adds seconds to other specifiers 5 var_dump(datetime::createFromFormat('U H', '3600 01')->getTimestamp());
|
H A D | bug43527.phpt | 6 $datetime = new DateTime('Fri, 07 Dec 2007 19:05:14 +1000'); 7 echo $datetime->getTimezone()->getName(), "\n";
|
H A D | DateTimeImmutable_modify_invalid_format.phpt | 6 $datetime = new DateTimeImmutable; 7 var_dump($datetime->modify(''));
|
H A D | timezone_offset_get_error.phpt | 35 echo "\n-- Testing timezone_offset_get() function with an invalid values for \$datetime argument --… 69 -- Testing timezone_offset_get() function with an invalid values for $datetime argument -- 70 string(96) "timezone_offset_get(): Argument #2 ($datetime) must be of type DateTimeInterface, stdCl… 72 string(91) "timezone_offset_get(): Argument #2 ($datetime) must be of type DateTimeInterface, int g… 74 string(92) "timezone_offset_get(): Argument #2 ($datetime) must be of type DateTimeInterface, null …
|
/PHP-8.2/ext/intl/common/ |
H A D | common_date.cpp | 116 php_date_obj *datetime; in intl_datetime_decompose() local 130 datetime = Z_PHPDATE_P(z); in intl_datetime_decompose() 131 *millis = U_MILLIS_PER_SECOND * (double)Z_LVAL(retval) + (datetime->time->us / 1000); in intl_datetime_decompose() 136 php_date_obj *datetime; in intl_datetime_decompose() local 137 datetime = Z_PHPDATE_P(z); in intl_datetime_decompose() 138 if (!datetime->time) { in intl_datetime_decompose() 146 if (!datetime->time->is_localtime) { in intl_datetime_decompose() 149 *tz = timezone_convert_datetimezone(datetime->time->zone_type, in intl_datetime_decompose() 150 datetime, 1, NULL, func); in intl_datetime_decompose()
|
/PHP-8.2/Zend/tests/type_declarations/variance/internal_parent/ |
H A D | unresolvable_inheritance_check_return.phpt | 7 public static function createFromFormat($format, $datetime, $timezone = null): Wrong { } 12 …createFromFormat($format, $datetime, $timezone = null): Wrong and DateTime::createFromFormat(strin…
|
H A D | unresolvable_inheritance_check_param.phpt | 7 …public static function createFromFormat($format, $datetime, Wrong $timezone = null): DateTime|fals… 12 …omFormat($format, $datetime, ?Wrong $timezone = null): DateTime|false and DateTime::createFromForm…
|
/PHP-8.2/ext/date/ |
H A D | php_date.stub.php | 101 function strtotime(string $datetime, ?int $baseTimestamp = null): int|false {} argument 152 string $datetime = "now", ?DateTimeZone $timezone = null): DateTimeImmutable|false {} argument 156 string $format, string $datetime, ?DateTimeZone $timezone = null): DateTime|false {} argument 166 function date_parse(string $datetime): array {} argument 172 function date_parse_from_format(string $format, string $datetime): array {} argument 220 function timezone_offset_get(DateTimeZone $object, DateTimeInterface $datetime): int {} argument 251 function date_interval_create_from_date_string(string $datetime): DateInterval|false {} argument 341 public function __construct(string $datetime = "now", ?DateTimeZone $timezone = null) {} argument 453 public function __construct(string $datetime = "now", ?DateTimeZone $timezone = null) {} argument 624 public function getOffset(DateTimeInterface $datetime): int {} argument [all …]
|
/PHP-8.2/ext/intl/dateformat/ |
H A D | dateformat.stub.php | 172 * @param IntlCalendar|DateTimeInterface|array|string|int|float $datetime 176 public function format($datetime): string|false {} argument 179 * @param IntlCalendar|DateTimeInterface $datetime 184 …public static function formatObject($datetime, $format = null, ?string $locale = null): string|fal… argument
|
/PHP-8.2/ext/session/tests/ |
H A D | gh13680.phpt | 19 public static function createFromFormat($format, $datetime, $timezone = null): Wrong {} 25 …createFromFormat($format, $datetime, $timezone = null): Wrong and DateTime::createFromFormat(strin…
|