how to use data controls in Cocoa : I am using Xcode(7.3.1) and MacOS EICaptian(10.11.4) and Trying to create a sample project using with "date Controls" In that i tried below mentioned things but i am getting errors,
like "dateWithNaturalLanguageString is deprecated in os x 10.10"Instead of this What can i use. 


var book:Book
    override init() {
        book = Book()
        book.author = "Mr. Author"
        book.title = "The Book's Title"
        book.pageCount = 350
        book.publishDate = NSDate.dateWithNaturalLanguageString("03/20/1979") as! NSDate

and i created custom class and i wrote like this Code:
 var author:String
    var title:String
    var pageCount:Int
    var publishDate: NSDate
    
    override init() {
        author = "author"
        title = "title"
        pageCount = 0
        publishDate = NSDate.date()
the error: "date() is  unavailable:use object Construction NSDate()". Please help me out.