By default, AM and PM are in upper case font when you use the DateFormatter
After using your DateFormatter
, simply call lowercased()
on your date string.
let date = Date()
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "ha"
let formattedDate = dateFormatter.string(from: date).lowercased()
The Complete iOS App Development Bootcamp
Disclosure: This website may contain affiliate links, meaning when you click the links and make a purchase, we receive a commission.