<?php
require_once(class.datetime.php);
$time = time() - rand(0, 172800);
$timeStr = DateTime::timeStampToString($time);
echo "Compare $time to ", time(), : , DateTime::compareDates($time, time()), "<br /><br /> ";
echo "$time to string: $timeStr<br /><br /> ";
echo "$timeStr to time stamp: ", DateTime::timeStringToStamp($timeStr), "<br /><br /> ";
echo "$timeStr as Y-m-D: ", DateTime::timeFormat($timeStr, Y-m-d), "<br /><br /> ";
echo "$time as Y-m-D: ", DateTime::timeFormat($time, Y-m-d), "<br /><br /> ";
echo "From $time to ", time(), as human readable: , DateTime::timeToHumanReadable(time() - $time), "<br /><br /> ";
echo "$time as fuzzy time string: ", DateTime::fuzzyTimeString($time), "<br /><br /> ";
?>