Skip to content

Commit 57279bf

Browse files
committed
Upgrade to the new date formatting APIs in iOS 15
1 parent 38856b5 commit 57279bf

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

GHFollowers/Extensions/Date+Ext.swift

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,7 @@
99
import Foundation
1010

1111
extension Date {
12-
1312
func convertToMonthYearFormat() -> String {
14-
let dateFormatter = DateFormatter()
15-
dateFormatter.dateFormat = "MMM yyyy"
16-
17-
return dateFormatter.string(from: self)
13+
formatted(.dateTime.month().year())
1814
}
19-
20-
2115
}

0 commit comments

Comments
 (0)