Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个NSDate格式NSDateFormatter为“hh:mm:ss”。一切都正常显示,除非小时是一位数(例如 3:00),它会显示 03:00。我将如何摆脱那个 0 让它显示 3:00?
NSDate
NSDateFormatter
如果您使用 1h而不是 2,您将不会得到前导 0。
h
h:mm:ss