Created
July 29, 2023 13:02
-
-
Save foxicode/a98c719f1f77844869cc4664f548afa9 to your computer and use it in GitHub Desktop.
DateFormatter custom constructor in Swift
This file contains hidden or 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
| public extension DateFormatter { | |
| convenience init(dateFormat: String, locale: Locale) { | |
| self.init() | |
| self.dateFormat = dateFormat | |
| self.locale = locale | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment