Back to Date class

Method calendar

public string
calendar
(mixed $format, mixed $local = false, mixed $translate = true)
Gets the date as a formatted string in a local calendar.
Parameters
  • string $format The date format specification string (see {@link PHP_MANUAL#date})
  • bool $local True to return the date string in the local time zone, false to return it in GMT.
  • bool $translate True to translate localised strings
Returns
  • string The date string in the specified format format.
Since
  • 1.7.0
Class: Date
Project: Joomla

Method calendar - Source code

/**
 * Gets the date as a formatted string in a local calendar.
 *
 * @param   string   $format     The date format specification string (see {@link PHP_MANUAL#date})
 * @param   boolean  $local      True to return the date string in the local time zone, false to return it in GMT.
 * @param   boolean  $translate  True to translate localised strings
 *
 * @return  string   The date string in the specified format format.
 *
 * @since   1.7.0
 */
public function calendar($format, $local = false, $translate = true)
{
    return $this->format($format, $local, $translate);
}