CoreFiles by mySites.guru
calendar.php28 lines, 622 bytes, from Joomla_4.2.3-Stable-Full_Package.zip
Raw History Compare with 4.2.2
md5
11e361cb840e33a248222187efdd1861
sha1
d7a357645a132dc5e3973c6ab8f500f1bfd76a91
sha256
916a285e5fc6b753131f8e3a0757166f4c77cf96cd4f5ecba576d5ccf4ace524
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.Calendar
 *
 * @copyright   (C) 2016 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;

$value = $field->value;

if ($value == '') {
    return;
}

if (is_array($value)) {
    $value = implode(', ', $value);
}

$formatString =  $field->fieldparams->get('showtime', 0) ? 'DATE_FORMAT_LC5' : 'DATE_FORMAT_LC4';

echo htmlentities(HTMLHelper::_('date', $value, Text::_($formatString)));

The same content is in 230 releases, Joomla 4.2.0-beta3 to 6.2.1-rc1. See them all, or every version of this file.