#85. PHP Date Function

 How to work PHP Date Function?

Syntax:


Run Code:

<?php
//

echo "Today is :". date("d"). "<br>";
echo "Today is :". date("j"). "<br>";
echo "Today is :". date("jS"). "<br>";
echo "Month is :". date("F"). "<br>";
echo "Month is :". date("m"). "<br>";
echo "Month is :". date("n"). "<br>";
echo "Month is :". date("M"). "<br>";
echo "Year is :". date("Y"). "<br>";
echo "Year is :". date("y"). "<br>";

echo "Full Date is :". date("d/m/Y"). "<br>";
echo "Full Date is :". date("d-m-Y"). "<br>";

echo "--------Week Day----------" . "<br>";

echo "Week day is :". date("N"). "<br>";
echo "Week day is :". date("w"). "<br>";
echo "Week day is :". date("z"). "<br>";    //Day of the year
echo "Week of the year :". date("W"). "<br>";
echo "Days of the Month :". date("t"). "<br>";

echo "Is this leap year :". date("L"). "<br>";


?>


Comments

Popular posts from this blog

#30. PHP Recursive Function