代码如下 |
复制代码 |
echo("Result with date():
");
echo(date("l") . "
");
echo(date("l dS of F Y h:i:s A") . "
");
echo("Oct 3,1975 was on a ".date("l", mktime(0,0,0,10,3,1975))."
");
echo(date(DATE_RFC822) . "
");
echo(date(DATE_ATOM,mktime(0,0,0,10,3,1975)) . "
");
echo("Result with gmdate():
");
echo(gmdate("l") . "
");
echo(gmdate("l dS of F Y h:i:s A") . "
");
echo("Oct 3,1975 was on a ".gmdate("l", mktime(0,0,0,10,3,1975))."
");
echo(gmdate(DATE_RFC822) . "
");
echo(gmdate(DATE_ATOM,mktime(0,0,0,10,3,1975)) . "
");
?>
Result with date():
Wednesday
Wednesday 22nd of December 2010 02:36:18 AM
Oct 3,1975 was on a Friday
Wed, 22 Dec 10 02:36:18 +0000
1975-10-03T00:00:00+00:00
Result with gmdate():
Wednesday
Wednesday 22nd of December 2010 02:36:18 AM
Oct 3,1975 was on a Friday
Wed, 22 Dec 10 02:36:18 +0000
1975-10-03T00:00:00+00:00
|
echo("Result with date():
");
echo(date("l") . "
");
echo(date("l dS of F Y h:i:s A") . "
");
echo("Oct 3,1975 was on a ".date("l", mktime(0,0,0,10,3,1975))."
");
echo(date(DATE_RFC822) . "
");
echo(date(DATE_ATOM,mktime(0,0,0,10,3,1975)) . "
");
echo("Result with gmdate():
");
echo(gmdate("l") . "
");
echo(gmdate("l dS of F Y h:i:s A") . "
");
echo("Oct 3,1975 was on a ".gmdate("l", mktime(0,0,0,10,3,1975))."
");
echo(gmdate(DATE_RFC822) . "
");
echo(gmdate(DATE_ATOM,mktime(0,0,0,10,3,1975)) . "
");
?>
Result with date():
Wednesday
Wednesday 22nd of December 2010 02:36:18 AM
Oct 3,1975 was on a Friday
Wed, 22 Dec 10 02:36:18 +0000
1975-10-03T00:00:00+00:00
Result with gmdate():
Wednesday
Wednesday 22nd of December 2010 02:36:18 AM
Oct 3,1975 was on a Friday
Wed, 22 Dec 10 02:36:18 +0000
1975-10-03T00:00:00+00:00
|