public static function getFormatter($locale = null, $timezone = null, $date = true, $time = true, $seconds = false)
    {
        $locale = null === $locale ? \Locale::getDefault() : $locale;
        $date_format = \IntlDateFormatter::NONE;
        $time_format = \IntlDateFormatter::NONE;

        if ($date) {
            $date_format = \IntlDateFormatter::SHORT;
        }

        if ($time) {
            $time_format = $seconds ? \IntlDateFormatter::MEDIUM : \IntlDateFormatter::SHORT;
        }

        $formatter = new \IntlDateFormatter($locale, $date_format, $time_format, $timezone, \IntlDateFormatter::GREGORIAN, null);
        $formatter->setLenient(false);

        return $formatter;
    }