(defun clock (hhmm)
(let ((hh (parse-integer (subseq hhmm 0 2)))
(mm (parse-integer (subseq hhmm 3 5))))
(princ
(substitute #\ #\- (format nil
"It's ~r~:[~:[~; oh~] ~r~;~*~*~] ~:[pm~;am~]~%"
(1+ (mod (1- hh) 12))
(= mm 0)
(< mm 10)
mm
(< hh 12))))))
;; test
(mapc #'clock '("00:00" "01:30" "12:05" "14:01" "20:29" "21:00"))
KGRlZnVuIGNsb2NrIChoaG1tKQogIChsZXQgKChoaCAocGFyc2UtaW50ZWdlciAoc3Vic2VxIGhobW0gMCAyKSkpCiAgICAgICAgKG1tIChwYXJzZS1pbnRlZ2VyIChzdWJzZXEgaGhtbSAzIDUpKSkpCiAgICAocHJpbmMKICAgICAgKHN1YnN0aXR1dGUgI1wgICNcLSAoZm9ybWF0IG5pbAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIkl0J3MgfnJ+Olt+Olt+OyBvaH5dIH5yfjt+Kn4qfl0gfjpbcG1+O2Ftfl1+JSIKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxKyAobW9kICgxLSBoaCkgMTIpKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKD0gbW0gMCkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICg8IG1tIDEwKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbW0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICg8IGhoIDEyKSkpKSkpCgo7OyB0ZXN0CihtYXBjICMnY2xvY2sgJygiMDA6MDAiICIwMTozMCIgIjEyOjA1IiAiMTQ6MDEiICIyMDoyOSIgIjIxOjAwIikp