Closed kazuooooo closed 4 years ago
Hi, thank you for building very useful Library 😊
I noticed toFormat method is little bit strange. Code to reproduce here.
let a = "2020-05-20 00:00:00".toDate() print(a?.toFormat("h:mm a")) // => Optional("12:00 AM")
It looks h and a are inconsistent.
I think it should be 12:00 PM or 0:00 AM. I am happy if you can help me 🙏
It's correct; let's take a look at the Unicode Table for Date Formatting:
you must pass a 0-23 time format, HH to obtain your result.
HH
Hi, thank you for building very useful Library 😊
I noticed toFormat method is little bit strange. Code to reproduce here.
It looks h and a are inconsistent.
I think it should be 12:00 PM or 0:00 AM. I am happy if you can help me 🙏