mirror of
https://github.com/XcodesOrg/XcodesApp.git
synced 2026-02-02 11:33:02 +01:00
20 lines
642 B
Swift
20 lines
642 B
Swift
import Foundation
|
|
|
|
extension DateFormatter {
|
|
/// Date format used in JSON returned from `URL.downloads`
|
|
static let downloadsDateModified: DateFormatter = {
|
|
let formatter = DateFormatter()
|
|
formatter.dateFormat = "MM/dd/yy HH:mm"
|
|
formatter.locale = Locale(identifier: "en_US_POSIX")
|
|
formatter.calendar = .init(identifier: .iso8601)
|
|
return formatter
|
|
}()
|
|
|
|
/// Date format used in HTML returned from `URL.download`
|
|
static let downloadsReleaseDate: DateFormatter = {
|
|
let formatter = DateFormatter()
|
|
formatter.dateFormat = "MMMM d, yyyy"
|
|
return formatter
|
|
}()
|
|
}
|