Maybe with Date.parse("1/2/1970 " + input).getHours/Minutes, that would cover the AM/PM things.