add support for 12 hour format, close #7