<?php
echo "Today is " . date("Y/m/d") . "<br>";
echo "Today is " . date("Y.m.d") . "<br>";
echo "Today is " . date("Y-m-d") . "<br>";
echo "Today is " . date("l");
<?php
$date = date('Y-m-d H:i:s');
echo $date;
?>
<?php
echo "Today's date is :";
$today = date("d/m/Y");
echo $today;
?>
date_default_timezone_set('Asia/Kolkata');
echo date("Y-m-d H:i:s"); // time in India
# Current date
date_default_timezone_set('Asia/Kolkata');
echo date("Y-m-d H:i:s");
# Current Time
date_default_timezone_set("America/New_York");
echo "The time is " . date("h:i:sa");
$today = date("Y-m-d H:i:s");
$datetime = DateTime::createFromFormat('YmdHi', '201308131830');
echo $datetime->format('D');
// or
$date = new DateTime();
echo $date->format("D");
<?php
$month = date('m');
if($month == 12){
echo "<br />December is the month :)";
} else {
echo "<br /> The month is probably not December";
}
?>
angular js tabs