class JHtmlDate

Extended Utility class for handling date display.

Methods

static  string
relative( string $date, string $unit = null, string $time = null, string $format = null)

Function to convert a static time into a relative measurement

Details

static string relative( string $date, string $unit = null, string $time = null, string $format = null)

Function to convert a static time into a relative measurement

Parameters

string $date The date to convert
string $unit The optional unit of measurement to return if the value of the diff is greater than one
string $time An optional time to compare to, defaults to now
string $format An optional format for the JHtml::date output

Return Value

string The converted time string