Advertisement
nikolaysimeonov

01.Print current date

Jun 12th, 2014
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.71 KB | None | 0 0
  1. <!doctype html>
  2. <html>
  3. <head>
  4.     <title>01.Print current date</title>
  5.         <meta charset="utf8"/>
  6. </head>
  7. <body>
  8. <?php
  9.     echo date('d-m-Y')."<br/>";
  10.     echo date('d.m.y')."<br/>";
  11.     echo date('d F Y')."<br/>";
  12.     date_default_timezone_set("Europe/Sofia");
  13.     echo "The time is ". date("H:i:s")."<br/>";
  14.     echo "Today is ".date("l");
  15. /*
  16. d - Represents the day of the month (01 to 31)
  17. m - Represents a month (01 to 12)
  18. Y - Represents a year (in four digits)
  19. 1 - Represents the day of the week
  20.  
  21. h - 12-hour format of an hour with leading zeros (01 to 12)
  22. i - Minutes with leading zeros (00 to 59)
  23. s - Seconds with leading zeros (00 to 59)
  24. a - Lowercase Ante meridiem and Post meridiem (am or pm)
  25. */
  26. ?>
  27. </body>
  28. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement