File: D:/HostingSpaces/RDamen/damenbeletteringen.nl/wwwroot/admin/system/cms/helpers/MY_date_helper.php
<?php defined('BASEPATH') OR exit('No direct script access allowed.');
/**
* PyroCMS Date Helpers
*
* This overrides Codeigniter's helpers/date_helper.php
*
* @author PyroCMS Dev Team
* @copyright Copyright (c) 2012, PyroCMS LLC
* @package PyroCMS\Core\Helpers
*/
if (!function_exists('format_date'))
{
/**
* Formats a timestamp into a human date format.
*
* @param int $unix The UNIX timestamp
* @param string $format The date format to use.
* @return string The formatted date.
*/
function format_date($unix, $format = '')
{
if ($unix == '' || !is_numeric($unix))
{
$unix = strtotime($unix);
}
if (!$format)
{
$format = Settings::get('date_format');
}
return strstr($format, '%') !== false ? ucfirst(utf8_encode(strftime($format, $unix))) : date($format, $unix);
}
}