Back to Joomla project (class list)

Class Date - list of methods

Extended Utility class for handling date display.
Package: Joomla\CMS\HTML\Helpers
Copyright: (C) 2011 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/HTML/Helpers/Date.php
Project: Joomla

Method Summary

public static string
(mixed $date, mixed $unit = null, mixed $time = null, mixed $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 HTMLHelper::date output
Returns
  • string The converted time string
Since
  • 2.5
Show source code of this method: relative Source Code

Tags Summary

Since
2.5