mirror of
https://github.com/php/php-src.git
synced 2025-08-20 09:24:05 +02:00
- Oops missed return. Also improved the readability of a test.
This commit is contained in:
parent
5ae7564890
commit
736ada5931
2 changed files with 14 additions and 0 deletions
|
@ -182,6 +182,8 @@ void SdnToGregorian(
|
|||
*pYear = year;
|
||||
*pMonth = month;
|
||||
*pDay = day;
|
||||
return;
|
||||
|
||||
fail:
|
||||
*pYear = 0;
|
||||
*pMonth = 0;
|
||||
|
|
|
@ -14,30 +14,37 @@ $jd_days = Array(
|
|||
);
|
||||
|
||||
foreach ($jd_days as $jd_day) {
|
||||
echo "=== ", $jd_day, "\n";
|
||||
var_dump(jdmonthname($jd_day,0));
|
||||
var_dump(jdmonthname($jd_day,1));
|
||||
var_dump(jdmonthname($jd_day,2));
|
||||
var_dump(jdmonthname($jd_day,3));
|
||||
var_dump(jdmonthname($jd_day,4));
|
||||
var_dump(jdmonthname($jd_day,5));
|
||||
echo "\n";
|
||||
}
|
||||
|
||||
echo "Done\n";
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
=== 2453396
|
||||
string(3) "Jan"
|
||||
string(7) "January"
|
||||
string(3) "Jan"
|
||||
string(7) "January"
|
||||
string(6) "Shevat"
|
||||
string(0) ""
|
||||
|
||||
=== 2440588
|
||||
string(3) "Jan"
|
||||
string(7) "January"
|
||||
string(3) "Dec"
|
||||
string(8) "December"
|
||||
string(5) "Tevet"
|
||||
string(0) ""
|
||||
|
||||
=== -1
|
||||
string(0) ""
|
||||
string(0) ""
|
||||
string(0) ""
|
||||
|
@ -45,6 +52,8 @@ string(0) ""
|
|||
string(0) ""
|
||||
string(0) ""
|
||||
|
||||
=== Array
|
||||
|
||||
Warning: jdmonthname() expects parameter 1 to be long, array given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
|
@ -62,10 +71,13 @@ bool(false)
|
|||
|
||||
Warning: jdmonthname() expects parameter 1 to be long, array given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
=== 10000000
|
||||
string(3) "Dec"
|
||||
string(8) "December"
|
||||
string(3) "Jul"
|
||||
string(4) "July"
|
||||
string(6) "Tishri"
|
||||
string(0) ""
|
||||
|
||||
Done
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue