Swift - New Update gives optional issues
<p>I just updated to Xcode 8 and Swift 3 on my iOS project. It now gives me problems in my app. Instead of giving me the right date and time elements, my label is displaying <code>&quot;Optional(2016)/Optional(09)/Optional(15)&quot;</code> instead of <code>&quot;2016/09/15&quot;</code>. I haven't changed any code since the update and it was correct before. This is what I'm using:</p>
<pre><code>let date = Date()
let calendar = Calendar.current
let components = (calendar as NSCalendar).components([.month, .year, .day, .hour, .minute, .second], from: date)
var day = components.day
var day1 = components.day
var year = components.year
var month = components.month
let hour = components.hour
let minutes = components.minute
let seconds = components.second


let timeString = &quot;\(hour):\(minutes):\(seconds)&quot;
var dateString = &quot;\(year)/\(month)/\(day)&quot;
</code></pre>
<p>Anybody know new optional syntax?</p>