private function getTime($input)
    {
        //test 12 h format
        preg_match('/(1[012]|[1-9]):[0-5][0-9](\\s)?(?i)(am|pm)/', $input, $matches);
        if (count($matches) > 0) {
            return $matches[0];
        }

        //test 24 h format
        preg_match('/([01]?[0-9]|2[0-3]):[0-5][0-9]/', $input, $matches);
        if (count($matches) > 0) {
            return $matches[0];
        }

        return null;
    }