let now = Date()

print(now.formatted())                                              // 10/5/2021, 3:46 PM

print(now.formatted(date: .complete, time: .omitted))               // Tuesday, October 5, 2021

print(now.formatted(.iso8601.dateSeparator(.dash)))                 // 2021-10-05T22:46:58Z

print(now.formatted(.dateTime.year().month()))                      // Oct 2021

print(now.formatted(.dateTime.year(.twoDigits).month(.wide)))       // October 21

print(now.formatted(.dateTime.locale(Locale(identifier: "cs"))))    // 5. 10. 2021 15:46