public function convertPhpToJavascriptFormat($phpFormat)
    {
        // Converts all the meaningful characters.
        $replacements = self::REPLACEMENTS;

        // Converts all the escaped meaningful characters.
        foreach (self::REPLACEMENTS as $from => $to) {
            $replacements['\\' . $from] = '[' . $from . ']';
        }

        return strtr($phpFormat, $replacements);
    }