get tomorrow's date in swift

You can use Calendar and Date to get tomorrow's date in Swift:

main.swift
let calendar = Calendar.current
let tomorrow = calendar.date(byAdding: .day, value: 1, to: Date())
print(tomorrow)
115 chars
4 lines

This code gets the current calendar and adds one day to the current date (Date()). The resulting date is tomorrow's date, which is printed to the console.

gistlibby LogSnag