Location: PHPKode > scripts > Literal Time > literal-time/TimeExample.php
<?php

require_once('LITERAL_TIME.class');

// Display current time
$Time = new LITERAL_TIME();
echo $Time->Time() . "\n";

// Display current time without meridiem
$Time = new LITERAL_TIME(null, false);
echo $Time->Time() . "\n";

// Display a supplied time.
$Now = mktime(12,0,0);
$Time = new LITERAL_TIME($Now, false);
echo $Time->Time() . "\n";

// Quater to One
$Now = mktime(24,45,0);
$Time = new LITERAL_TIME($Now, false);
echo $Time->Time() . "\n";

// Ten Twenty-Six in the Morning
$Now = mktime(10,26,0);
$Time = new LITERAL_TIME($Now);
echo $Time->Time() . "\n";
?>
Return current item: Literal Time