var date = NSDate.date() var timeFormatter = NSDateFormatter() timeFormatter.dateFormat = "MM-dd 'at' HH:mm:ss" var time = timeFormatter.stringFromDate(date) as String
//: Playground - noun: a place where people can play import UIKit // Swift中不需要设置main函数入口,编译器会在全局函数中自动设置程序的入口,在书写Swift代码时,可以不使用";"作为语句的结束标志 var str = "Hello, playground" var str1 = "Hello, LiLe" print("Hello World!")