Example #1
0
 static function createFromFormatYmd($string_date)
 {
     if ($string_date) {
         $configJ = JComponentHelper::getParams('com_bookpro');
         $php_format = $configJ->get('date_day_short', 'Y-m-d');
         $date = Jdate::createFromFormat($php_format, $string_date);
         if ($date) {
             return $date->format('Y-m-d');
         }
     }
     return '';
 }