/PHP-7.3/ext/date/tests/ |
H A D | bug62896.phpt | 4 date.timezone=Europe/Berlin 12 echo $date->format('Y-m-d H:i:s T').' (offset '.$date->getOffset().")\n"; 14 $date->modify('+0 days'); 15 echo $date->format('Y-m-d H:i:s T').' (offset '.$date->getOffset().")\n"; 20 $date->setTimezone($tz); 21 echo $date->format('Y-m-d H:i:s T').' (offset '.$date->getOffset().")\n"; 23 $date->modify('+0 days'); 24 echo $date->format('Y-m-d H:i:s T').' (offset '.$date->getOffset().")\n"; 29 echo $date->format('Y-m-d H:i:s T').' (offset '.$date->getOffset().")\n"; 31 $date->modify('+0 days'); [all …]
|
H A D | date_basic1.phpt | 2 Test date() function : basic functionality 6 * Description: Format a local time/date. 7 * Source code: ext/date/php_date.c 13 echo "*** Testing date() : basic functionality ***\n"; 17 var_dump( date("F j, Y, g:i a", $timestamp) ); 18 var_dump( date("m.d.y", $timestamp) ); 19 var_dump( date("j, n, Y", $timestamp) ); 20 var_dump( date("Ymd", $timestamp) ); 23 var_dump( date("D M j G:i:s T Y", $timestamp) ); 25 var_dump( date("H:i:s", $timestamp) ); [all …]
|
H A D | DateTime_format_basic2.phpt | 7 * Source code: ext/date/php_date.c 15 $date = new DateTime("2005-07-14 22:30:41"); 17 var_dump( $date->format( DateTime::ATOM) ) ; 18 var_dump( $date->format( DateTime::COOKIE) ) ; 19 var_dump( $date->format( DateTime::ISO8601) ) ; 20 var_dump( $date->format( DateTime::RFC822) ) ; 21 var_dump( $date->format( DateTime::RFC850) ) ; 22 var_dump( $date->format( DateTime::RFC1036) ) ; 23 var_dump( $date->format( DateTime::RFC1123) ) ; 26 var_dump( $date->format( DateTime::RSS) ) ; [all …]
|
H A D | bug45866.phpt | 4 date.timezone=UTC 7 $date = new DateTime( '2009-07-29 16:44:23 Europe/London' ); 8 $date->modify( "+1.61538461538 day" ); 9 echo $date->format( 'r' ), "\n"; 11 $date = new DateTime( '2009-07-29 16:44:23 Europe/London' ); 12 $date->modify( "61538461538 day" ); 13 echo $date->format( 'r' ), "\n"; 15 $date = new DateTime( '2009-07-29 16:44:23 Europe/London' ); 16 $date->modify( "£61538461538 day" ); 17 echo $date->format( 'r' ), "\n";
|
H A D | 004.phpt | 2 date() format params 13 var_dump(date("w", $t)); 14 var_dump(date("z", $t)); 15 var_dump(date("n", $t)); 16 var_dump(date("t", $t)); 17 var_dump(date("L", $t)); 18 var_dump(date("a", $t)); 19 var_dump(date("B", $t)); 20 var_dump(date("g", $t)); 21 var_dump(date("G", $t)); [all …]
|
H A D | date_error.phpt | 2 Test date() function : error conditions 5 /* Prototype : string date ( string $format [, int $timestamp ] ) 6 * Description: Format a local time/date. 7 * Source code: ext/date/php_date.c 10 echo "*** Testing date() : error conditions ***\n"; 18 echo "\n-- Testing date function with no arguments --\n"; 19 var_dump (date()); 28 *** Testing date() : error conditions *** 30 -- Testing date function with no arguments -- 32 Warning: date() expects at least 1 parameter, 0 given in %s on line %d [all …]
|
H A D | date-lenient-create.phpt | 2 Test for + character in date format 6 $date = "06/08/04 12:00"; 8 print_r( date_create_from_format( 'm/d/y', $date , $tz) ); 11 print_r( date_create_from_format( 'm/d/y+', $date , $tz)->setTime(0, 0) ); 14 print_r( date_create_from_format( '+m/d/y', $date , $tz)->setTime(0, 0) ); 21 $date = "06/08/04"; 49 [date] => 2004-06-08 00:00:00.000000 70 [date] => 2004-06-08 00:00:00.000000 91 [date] => 2004-06-08 00:00:00.000000 112 [date] => 2004-06-08 00:00:00.000000 [all …]
|
H A D | DateTime_format_basic1.phpt | 7 * Source code: ext/date/php_date.c 15 $date = new DateTime("2005-07-14 22:30:41"); 17 var_dump( $date->format( "F j, Y, g:i a") ); 18 var_dump( $date->format( "m.d.y") ); 19 var_dump( $date->format( "j, n, Y") ); 20 var_dump( $date->format( "Ymd") ); 21 var_dump( $date->format( 'h-i-s, j-m-y, it is w Day') ); 22 var_dump( $date->format( '\i\t \i\s \t\h\e jS \d\a\y.') ); 23 var_dump( $date->format( "D M j G:i:s T Y") ); 24 var_dump( $date->format( 'H:m:s \m \i\s\ \m\o\n\t\h') ); [all …]
|
H A D | date_format_basic1.phpt | 6 * Description: Returns date formatted according to given format 7 * Source code: ext/date/php_date.c 15 $date = date_create("2005-07-14 22:30:41"); 17 var_dump( date_format($date, "F j, Y, g:i a") ); 18 var_dump( date_format($date, "m.d.y") ); 19 var_dump( date_format($date, "j, n, Y") ); 20 var_dump( date_format($date, "Ymd") ); 21 var_dump( date_format($date, 'h-i-s, j-m-y, it is w Day') ); 23 var_dump( date_format($date, "D M j G:i:s T Y") ); 24 var_dump( date_format($date, 'H:m:s \m \i\s\ \m\o\n\t\h') ); [all …]
|
H A D | forward-transition-construction.phpt | 7 $date = new DateTime('2010-03-14 01:30:00'); 8 echo $date->format('Y-m-d H:i:s T/e - U') . "\n"; 10 $date = new DateTime('2010-03-14 02:00:00'); 11 echo $date->format('Y-m-d H:i:s T/e - U') . "\n"; 13 $date = new DateTime('2010-03-14 02:30:00'); 14 echo $date->format('Y-m-d H:i:s T/e - U') . "\n"; 16 $date = new DateTime('2010-03-14 03:00:00'); 17 echo $date->format('Y-m-d H:i:s T/e - U') . "\n"; 19 $date = new DateTime('2010-03-14 03:30:00'); 20 echo $date->format('Y-m-d H:i:s T/e - U') . "\n";
|
H A D | bug52577.phpt | 2 Bug #52577 (Incorrect date returning) 6 $date = '7.8.2010'; 7 echo "String: ".$date."\n"; 9 $unixtime = strtotime($date); 11 echo "Date(PHP): ".date($date_format,$unixtime)."\n"; 12 $date = new DateTime('@'.$unixtime); 13 echo "DateTime(PHP Class): ".$date->format($date_format);
|
H A D | bug41844.phpt | 7 $date = new DateTime('2007-06-28'); 8 $date->modify('-3006 years'); 9 echo $date->format(DATE_ISO8601), "\n"; 11 $date = new DateTime('2007-06-28'); 12 $date->modify('-2008 years'); 13 echo $date->format(DATE_ISO8601), "\n";
|
H A D | bug73426.phpt | 4 date.timezone=UTC 7 $date = '2016 12:00:00 15'; 9 var_dump(DateTime::createFromFormat($format, $date)); 11 $date = '16 12:00:00 2016'; 13 var_dump(DateTime::createFromFormat($format, $date)); 18 ["date"]=> 26 ["date"]=>
|
H A D | bug71525.phpt | 4 date.timezone=UTC 7 $date = new DateTime('2011-12-25 00:00:00'); 8 $date->modify('first day of next month'); 9 $date->setDate('2012', '1', '29'); 10 var_dump($date); 13 ["date"]=>
|
H A D | bug43452.phpt | 9 echo date( DateTime::ISO8601, $day ), "\n"; 11 echo date( DateTime::ISO8601, $day ), "\n"; 13 echo date( DateTime::ISO8601, $day ), "\n"; 15 echo date( DateTime::ISO8601, $day ), "\n\n"; 19 echo date( DateTime::ISO8601, $day ), "\n"; 21 echo date( DateTime::ISO8601, $day ), "\n"; 23 echo date( DateTime::ISO8601, $day ), "\n"; 31 echo date( DateTime::ISO8601, $day ), "\n"; 33 echo date( DateTime::ISO8601, $day ), "\n"; 35 echo date( DateTime::ISO8601, $day ), "\n"; [all …]
|
H A D | bug33578.phpt | 6 echo date('m/d/Y', strtotime('Oct 11')), "\n"; 7 echo date('m/d/Y', strtotime('11 Oct')), "\n"; 8 echo date('m/d/Y', strtotime('11 Oct 2005')), "\n"; 9 echo date('m/d/Y', strtotime('Oct11')), "\n"; 10 echo date('m/d/Y', strtotime('11Oct')), "\n"; 11 echo date('m/d/Y', strtotime('11Oct 2005')), "\n"; 12 echo date('m/d/Y', strtotime('11Oct2005')), "\n";
|
H A D | bug79396-forward-transition-settime.phpt | 7 $date = new DateTime('2020-03-08 01:30:00'); 8 echo $date->setTime(2, 0)->format('Y-m-d H:i:s T/e - U') . "\n"; 10 $date = new DateTime('2020-03-08 01:30:00'); 11 echo $date->setTime(2, 30)->format('Y-m-d H:i:s T/e - U') . "\n"; 13 $date = new DateTime('2020-03-08 01:30:00'); 14 echo $date->setTime(3, 0)->format('Y-m-d H:i:s T/e - U') . "\n"; 16 $date = new DateTime('2020-03-08 01:30:00'); 17 echo $date->setTime(1, 59, 59)->format('Y-m-d H:i:s T/e - U') . "\n";
|
H A D | bug32086.phpt | 4 date.timezone=America/Sao_Paulo 13 echo date("Y-m-d H:i:s T\n", $g); 14 echo date("Y-m-d H:i:s T\n", $i); 15 echo date("Y-m-d H:i:s T\n", $j); 16 echo date("Y-m-d H:i:s T\n", $k); 17 echo date("Y-m-d H:i:s T\n", $l); 24 echo date("Y-m-d H:i:s T\n", $g); 25 echo date("Y-m-d H:i:s T\n", $i); 26 echo date("Y-m-d H:i:s T\n", $j); 27 echo date("Y-m-d H:i:s T\n", $k); [all …]
|
H A D | bug69336.phpt | 4 date.timezone=UTC 7 var_dump(date('d.m.Y',strtotime('last day of april'))); 8 var_dump(date('d.m.Y',strtotime('last tuesday of march 2015'))); 9 var_dump(date('d.m.Y',strtotime('last wednesday of march 2015'))); 10 var_dump(date('d.m.Y',strtotime('last wednesday of april 2015'))); 11 var_dump(date('d.m.Y',strtotime('last wednesday of march 2014'))); 12 var_dump(date('d.m.Y',strtotime('last wednesday of april 2014')));
|
H A D | bug53879.phpt | 2 Bug #53879 (DateTime::createFromFormat() fails to parse cookie expiration date) 4 date.timezone=UTC 7 $date = DateTime::createFromFormat(DateTime::COOKIE, "Mon, 21-Jan-2041 15:24:52 GMT"); 8 print_r($date); 13 [date] => 2041-01-21 15:24:52.000000
|
H A D | bug74057.phpt | 5 echo date("D Y-m-d", strtotime("saturday this week", strtotime("Sun 2017-01-01")))."\n"; 6 echo date("D Y-m-d", strtotime("saturday this week", strtotime("Mon 2017-01-02")))."\n"; 7 echo date("D Y-m-d", strtotime("saturday this week", strtotime("Tue 2017-01-03")))."\n"; 8 echo date("D Y-m-d", strtotime("saturday this week", strtotime("Wed 2017-01-04")))."\n"; 9 echo date("D Y-m-d", strtotime("saturday this week", strtotime("Thu 2017-01-05")))."\n"; 10 echo date("D Y-m-d", strtotime("saturday this week", strtotime("Fri 2017-01-06")))."\n"; 11 echo date("D Y-m-d", strtotime("saturday this week", strtotime("Sat 2017-01-07")))."\n"; 12 echo date("D Y-m-d", strtotime("saturday this week", strtotime("Sun 2017-01-08")))."\n"; 13 echo date("D Y-m-d", strtotime("saturday this week", strtotime("Mon 2017-01-09")))."\n";
|
H A D | call_function_from_method.phpt | 2 Call to date function from a method and call to date method from call_user_func 4 date.timezone=UTC 10 $this->date = date_create($in); 14 return date_format($this->date, 'Y'); 18 return call_user_func([$this->date, 'format'], 'Y');
|
/PHP-7.3/ext/reflection/tests/ |
H A D | 026.phpt | 9 $r = new ReflectionExtension("date"); 19 date 21 date/time support => enabled 28 date.timezone => %s => %s 29 date.default_latitude => %s => %s 30 date.default_longitude => %s => %s 31 date.sunset_zenith => %s => %s 32 date.sunrise_zenith => %s => %s
|
/PHP-7.3/ext/soap/tests/schema/ |
H A D | schema064.phpt | 17 <element name="date" type="date"/> 26 $date = gmmktime(1,2,3,4,5,1976); 29 'dateTime' => $date, 30 'time' => $date, 31 'date' => $date, 32 'gYearMonth' => $date, 33 'gYear' => $date, 34 'gMonthDay' => $date, 35 'gDay' => $date, 36 'gMonth' => $date [all …]
|
/PHP-7.3/ext/intl/tests/ |
H A D | bug58756_MessageFormatter.phpt | 17 ini_set('date.timezone', 'America/New_York'); 19 $msgf = new MessageFormatter('en_US', '{0,date,full} {0,time,h:m:s a V}'); 21 echo "date: " . date('l, F j, Y g:i:s A T', $time) . "\n"; 26 '{1, select, date {{0,date,full}} other {{0,time,h:m:s a V}}}'); 28 echo "msgf2: ", $msgf->format(array($time, 'date')), " ", 35 date: Tuesday, July 7, 2009 8:41:13 PM EDT
|