HTMLify

Dates.php
Views: 151 | Author: djdj
<?php
    //dates in php
    
    echo date("d"). "\n";     //Print date of today : 24
    echo date("j"). "\n";     //Print date of today : 24
    echo date("l"). "\n";     //Print day of today  : Saturday
    echo date("D"). "\n";     //Print day of today  : Sat
    echo date("S"). "\n";     //Print th of today   : TH
    echo date("F"). "\n";     //Print month of today: February
    echo date("M"). "\n";     //Print month of today: Feb
    echo date("Y"). "\n";     //Print year of today : 2024
    echo date("h"). "\n";     //Print hour          : 08
    echo date("g"). "\n";     //Print hour          : 8
    echo date("i"). "\n";     //Print minute        : 12 
    echo date("s"). "\n";     //Print second        : 25
    echo date("a"). "\n";     //Print am/pm         : am/pm
    echo date("A"). "\n";     //Print AM/PM         : AM/PM 
    echo date("d"). "\n";     //Print date day year : 02
    echo date("n"). "\n";     //Print month of today: 2  

    echo date("h:i:s A") ."\n"; //Print time        : 4:45:20 PM
    echo date("dS D M Y")."\n"; //Print date        : 24th Sat Feb 2024
              
    //for more details go here:- https://www.php.net/manual/en/datetime.format.php
?>

Comments