Skip to content

Commit

Permalink
Update test via HTTP.
Browse files Browse the repository at this point in the history
  • Loading branch information
ve3 committed Dec 8, 2021
1 parent 5df9804 commit f55541a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 5 additions & 1 deletion tests/via-http/strftime-function.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
header('Content-Type: text/html; charset=UTF-8');


if (version_compare(PHP_VERSION, '8.1', '>=')) {
echo '<div style="border-left: 5px solid #f00; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); font-size: 1em; padding: 2px 5px;"><code>strftime()</code> function was deprecated since PHP 8.1.</div>' . PHP_EOL;
}

$locale = 'th';
setlocale(LC_ALL, $locale);

Expand All @@ -22,4 +26,4 @@
}
echo '<p>force using TIS-620 as charset.</p>' . PHP_EOL;
$datetime = iconv('TIS-620', 'UTF-8', $datetime);
echo $datetime . '<br>' . PHP_EOL;
echo ' &nbsp; &nbsp;<strong>' . $datetime . '</strong><br>' . PHP_EOL;
6 changes: 4 additions & 2 deletions tests/via-http/thaidate-function.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@

echo 'Begin test thaidate();.'."<br>\n";
echo 'time(); = '.time()."<br>\n";
echo 'Current date/time use date(); = '.date('Y-m-d H:i:s')."<br>\n";
echo 'Current date/time use strftime(); = '.strftime('%#d %A %B %Y')."<br>\n";
echo 'Current date/time use date(); = ' . date('Y-m-d H:i:s')."<br>\n";
if (function_exists('strftime')) {
echo 'Current date/time use strftime(); = ' . @strftime('%#d %A %B %Y')."<br>\n";
}
echo '----------------------------------'."<br>\n";
echo 'Thai date test.'."<br>\n";
echo '12 Months'."<br>\n";
Expand Down

0 comments on commit f55541a

Please sign in to comment.