๐ ๅ่๏ผSwift Playgrounds (Date Planner - Event Model)
// Convenience methods for dates. extension Date { // โญ๏ธ 7 ๅคฉๅพ // ex: Date.now.sevenDaysOut var sevenDaysOut: Date { Calendar.autoupdatingCurrent.date(byAdding: .day, value: 7, to: self) ?? self } // โญ๏ธ 30 ๅคฉๅพ // ex: Date.now.thirtyDaysOut var thirtyDaysOut: Date { Calendar.autoupdatingCurrent.date(byAdding: .day, value: 30, to: self) ?? self } }
Last updated 2 years ago
Was this helpful?