您的位置:首页 > 编程语言 > PHP开发

time_date.php

2016-05-04 19:04 781 查看
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

 <html>

  <head>

   <title> time_date.php </title>

   <meta charset="UTF-8">

   <meta name="Author" content="">

   <meta name="Keywords" content="">

   <meta name="Description" content="">

  </head>

 <body>

 <?php

 $t=time();

 var_dump($t);

 // 输出类似:Monday

 echo date("l",$t) . "<br>";

 // 输出类似:Monday 15th of August 2005 03:12:46 PM

 echo date('l dS \of F Y h:i:s A',$t). "<br>";

 echo date("F j, Y, g:i a",$t). "<br>";

 echo date("m.d.y",$t). "<br>";

 echo date("j, n, Y",$t). "<br>";

 echo date("Ymd",$t). "<br>";

 echo date('h-i-s, j-m-y, it is w Day z ',$t). "<br>";

 echo date('\i\t \i\s \t\h\e jS \d\a\y.',$t). "<br>";

 echo date("D M j G:i:s T Y",$t). "<br>";

 echo date('H:m:s \m \i\s\ \m\o\n\t\h',$t). "<br>";

 echo date("H:i:s",$t). "<br>";

 ?>

 <hr>

 <?php

 // 输出类似:Monday

 echo date("l") . "<br>";

 // 输出类似:Monday 15th of August 2005 03:12:46 PM

 echo date('l dS \of F Y h:i:s A'). "<br>";

 echo date("F j, Y, g:i a"). "<br>";

 echo date("m.d.y"). "<br>";

 echo date("j, n, Y"). "<br>";

 echo date("Ymd"). "<br>";

 echo date('h-i-s, j-m-y, it is w Day z '). "<br>";

 echo date('\i\t \i\s \t\h\e jS \d\a\y.'). "<br>";

 echo date("D M j G:i:s T Y"). "<br>";

 echo date('H:m:s \m \i\s\ \m\o\n\t\h'). "<br>";

 echo date("H:i:s"). "<br>";

 ?>

  </body>

 </html>

1462359802

Wednesday

Wednesday 04th of May 2016 11:03:22 AM

May 4, 2016, 11:03 am

05.04.16

4, 5, 2016

20160504

11-03-22, 4-05-16, 0331 0322 3 Wedam16 124

it is the 4th day.

Wed May 4 11:03:22 UTC 2016

11:05:22 m is month

11:03:22

Wednesday

Wednesday 04th of May 2016 11:03:22 AM

May 4, 2016, 11:03 am

05.04.16

4, 5, 2016

20160504

11-03-22, 4-05-16, 0331 0322 3 Wedam16 124

it is the 4th day.

Wed May 4 11:03:22 UTC 2016

11:05:22 m is month

11:03:22
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: