function disp() {
echo "
\n";
echo "
秒数を入力して日付を調べる!\n";
echo "";
}
function disp2() {
echo "
\n";
echo "ひにちを指定して1970年1月1日から何秒かを求める!\n";
echo "\n";
}
echo "";
if($time) {
$aft = date("h: i A l F dS, Y", $time);
echo "
\n";
echo "\n";
echo "あなたの指定した秒数($time)の日時は
";
echo $aft;
echo "
です。\n";
echo "
\n";
}
if($year) { // && $month && $day && $hour && $min && $sec) {
$ret = mktime($hour, $min, $sec, $month, $day, $year);
echo "
\n";
echo "\n";
echo "あなたの指定した日時($year/$month/$day/$hour:$min:$sec)の秒数は
";
echo $ret;
echo "
です。\n";
echo "
\n";
}
disp();
disp2();
/*
if(!$time) {
disp();
} else {
$aft = date("h: i A l F dS, Y", $time);
echo "
\n";
echo "\n";
echo "あなたの指定した秒数($time)の日時は ";
echo $aft;
echo "です。\n";
echo "
\n";
disp();
}
if(!$year && !$month && !$day && !$hour && !$min && !$sec) {
disp2();
}
*/
?>