mirror of
https://github.com/bolucat/Archive.git
synced 2025-12-24 13:28:37 +08:00
25 lines
619 B
Swift
25 lines
619 B
Swift
//
|
|
// DateFormatter+.swift
|
|
// ClashX
|
|
//
|
|
// Created by yicheng on 2019/12/14.
|
|
// Copyright © 2019 west2online. All rights reserved.
|
|
//
|
|
|
|
import Cocoa
|
|
|
|
extension DateFormatter {
|
|
static var js: DateFormatter {
|
|
let dateFormatter = DateFormatter()
|
|
dateFormatter.locale = Locale(identifier: NSCalendar.Identifier.ISO8601.rawValue)
|
|
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SZ"
|
|
return dateFormatter
|
|
}
|
|
|
|
static var simple: DateFormatter {
|
|
let dateFormatter = DateFormatter()
|
|
dateFormatter.dateFormat = "MM-dd HH:mm:ss"
|
|
return dateFormatter
|
|
}
|
|
}
|