Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Date-manipulation/Swift/date-manipulation.swift
Normal file
12
Task/Date-manipulation/Swift/date-manipulation.swift
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import Foundation
|
||||
|
||||
let formatter = DateFormatter()
|
||||
|
||||
formatter.dateFormat = "MMMM dd yyyy hh:mma zzz"
|
||||
|
||||
guard let date = formatter.date(from: "March 7 2009 7:30pm EST") else {
|
||||
fatalError()
|
||||
}
|
||||
|
||||
print(formatter.string(from: date))
|
||||
print(formatter.string(from: date + 60 * 60 * 12))
|
||||
Loading…
Add table
Add a link
Reference in a new issue