Abstract out string from time logic, add ampm support