Code Duplication    Length = 13-13 lines in 2 locations

class/Utility.php 1 location

@@ 386-398 (lines=13) @@
383
     *
384
     * @return int
385
     */
386
    public static function ext_convert_date($date, $sep = '-')
387
    {
388
        $lstSep = '/ .';
389
390
        for ($h = 0, $count = strlen($lstSep); $h < $count; ++$h) {
391
            $sep2replace = substr($lstSep, $h, 1);
392
            if (strpos($date, $sep2replace)) {
393
                $date = str_replace($sep2replace, $sep, $date);
394
            }
395
396
            return strtotime($date);
397
        }
398
    }
399
400
    /**
401
     * @param     $givendate

include/functions0.php 1 location

@@ 373-385 (lines=13) @@
370
 *
371
 * @return int
372
 */
373
function ext_convert_date($date, $sep = '-')
374
{
375
    $lstSep = '/ .';
376
377
    for ($h = 0, $count = strlen($lstSep); $h < $count; ++$h) {
378
        $sep2replace = substr($lstSep, $h, 1);
379
        if (strpos($date, $sep2replace)) {
380
            $date = str_replace($sep2replace, $sep, $date);
381
        }
382
383
        return strtotime($date);
384
    }
385
}
386
387
/**
388
 * @param     $givendate