Created
December 11, 2021 01:06
-
-
Save leeyspaul/5a60da9292c1249bcae996879efe14cb to your computer and use it in GitHub Desktop.
dateFormat example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
let date = Date() | |
let df = DateFormatter() | |
df.dateFormat = "MMM d, yyyy" // prints out "Dec 10, 2021" | |
print(df.string(from: date)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment