So, I am kinda new to programming, and I am learning the right way to do things. I am actually getting kind of excited because I am actually starting to understand how people find the information they need when making an app for apple or any company. Here is my question. I was just surfing around the website which explains the multiple classes that come with XCode and I found myself wanting to test if I could do different things with time in my app. Apple has a package for this called Foundation and in that package they have a class called NSTimeZone, not sure why each class has the NS prefix before every word, so if someone could explain that I would be grateful. So, In NSTimeZone they have a boolean check called isDaylightSavingsTime
https://developer.apple.com/reference/foundation/nstimezone/1387191-isdaylightsavingtime
It can be found right there. So I went to work and started messing with this class in XCode Playgrounds. The only problem is I don't know how to use this boolean value. I tried to do this...
var currentDate = NSDate.init()
var daylightsave: Bool = NSTimeZone.isDaylightSavingTime(for: currentDate)
var daylightsave: Bool = NSTimeZone.isDaylightSavingTime(NSTimeZone)
and many other things but nothing seems to work. I am trying to comprehend this so that I can better understand programming as a whole, and how to read and understand class documentation. If anyone has any Insight on this subject and can help feel free to comment. Please don't bash me I understand that this code may be wrong. I am trying to learn so let me know what's wrong.