public static function convertIntlFormaterToMalot($formatter)
    {
        $intlToMalot = array_combine(self::$intlFormater, self::$malotFormater);

        $patterns = preg_split('([\\\/.:_;,\s-\ ]{1})', $formatter);
        $exits = array();

        foreach ($patterns as $val) {
            if (isset($intlToMalot[$val])){
                $exits[$val] = $intlToMalot[$val];
            } else {
                // it can throw an Exception
                $exits[$val] = $val;
            }
        }

        return str_replace(array_keys($exits), array_values($exits), $formatter);
    }
public static function convertIntlFormaterToMalot($formatter)
    {
        $intlToMalot = array_combine(self::$intlFormater, self::$malotFormater);

        $patterns = preg_split('([\\\/.:_;,\s-\ ]{1})', $formatter);
        $exits = array();

        foreach ($patterns as $val) {
            if (isset($intlToMalot[$val])){
                $exits[$val] = $intlToMalot[$val];
            } else {
                // it can throw an Exception
                $exits[$val] = $val;
            }
        }

        return str_replace(array_keys($exits), array_values($exits), $formatter);
    }
public static function convertIntlFormaterToMalot ( $ formatter ) { $ intlToMalot = array_combine ( self :: $ intlFormater , self :: $ malotFormater ) ; $ patterns = preg_split ( '([\\\/.:_;,\s-\ ]{1})' , $ formatter ) ; $ exits = array ( ) ; foreach ( $ patterns as $ val ) { if ( isset ( $ intlToMalot [ $ val ] ) ) { $ exits [ $ val ] = $ intlToMalot [ $ val ] ; } else { // it can throw an Exception $ exits [ $ val ] = $ val ; } } return str_replace ( array_keys ( $ exits ) , array_values ( $ exits ) , $ formatter ) ; }
Convert the PHP date format to Bootstrap Datetimepicker date format
Convert the PHP date format to Bootstrap Datetimepicker date format