This repository was archived by the owner on Sep 15, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Sources/WordPressKit/Models/Stats Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ extension StatsSubscribersSummaryData: StatsTimeIntervalData {
1919
2020 static var hourlyDateFormatter : DateFormatter {
2121 let df = DateFormatter ( )
22- df. locale = Locale ( identifier: " en_US_POS " )
22+ df. locale = Locale ( identifier: " en_US_POSIX " )
2323 df. dateFormat = " yyyy-MM-dd HH:mm:ss "
2424 return df
2525 }
Original file line number Diff line number Diff line change @@ -75,15 +75,15 @@ extension StatsSiteMetricsResponse: StatsTimeIntervalData {
7575 let dateFormatter = makeDateFormatter ( for: period)
7676
7777 self . data = data. compactMap { data in
78- guard let periodDate = dateFormatter. date ( from: data [ periodIndex] as? String ?? " " ) else {
78+ guard let date = dateFormatter. date ( from: data [ periodIndex] as? String ?? " " ) else {
7979 return nil
8080 }
8181 func getValue( at index: Int ? ) -> Int ? {
8282 guard let index else { return nil }
8383 return data [ index] as? Int
8484 }
8585 return PeriodData (
86- date: periodDate ,
86+ date: date ,
8787 views: getValue ( at: indices. views) ,
8888 visitors: getValue ( at: indices. visitors) ,
8989 likes: getValue ( at: indices. likes) ,
You can’t perform that action at this time.
0 commit comments