This repository was archived by the owner on Sep 15, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Sources/WordPressKit/Models/Stats Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -39,29 +39,29 @@ public struct StatsPostDetails: Equatable {
3939 public let mimeType : String ?
4040 public let commentCount : String ?
4141 public let permalink : String ?
42-
42+
4343 init ? ( jsonDictionary: [ String : AnyObject ] ) {
4444 guard
4545 let postID = jsonDictionary [ " ID " ] as? Int ,
4646 let title = jsonDictionary [ " post_title " ] as? String
4747 else {
4848 return nil
4949 }
50-
50+
5151 let dateFormatter = DateFormatter ( )
5252 dateFormatter. locale = Locale ( identifier: " en_US_POSIX " )
5353 dateFormatter. dateFormat = " yyyy-MM-dd HH:mm:ss "
54-
54+
5555 var dateGMT : Date ?
5656 var modifiedGMT : Date ?
57-
57+
5858 if let postDateGMTString = jsonDictionary [ " post_date_gmt " ] as? String {
5959 dateGMT = dateFormatter. date ( from: postDateGMTString)
6060 }
6161 if let postModifiedGMTString = jsonDictionary [ " post_modified_gmt " ] as? String {
6262 modifiedGMT = dateFormatter. date ( from: postModifiedGMTString)
6363 }
64-
64+
6565 self . postID = postID
6666 self . title = title
6767 self . authorID = jsonDictionary [ " post_author " ] as? String
You can’t perform that action at this time.
0 commit comments