I am working on a movies app and it displays release date as part of the movie details on table view cell. Below is the code:
let date = movieDetail.releaseDate as String let releaseDateText = NSLocalizedString("release date", comment: "Release date label text") let tbaText = NSLocalizedString("tba", comment: "TBA text") releaseDateLabel.text = "\(releaseDateText): \(String(describing: date != "" ? Date.getMMMddyyyyDateFormat(date) : "\(tbaText)" ))"
With this, I do see the date on the screen as Optional("Jan 07,2018"). I just want to display the date without optional keyword and parenthesis. Am not able to figure out what is causing "Optional" keyword to show up.