Skip to content

Commit

Permalink
Made StatsPeriodUnit stringValue public
Browse files Browse the repository at this point in the history
  • Loading branch information
guarani committed Apr 25, 2024
1 parent 7d6e0e7 commit 1b31242
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ extension StatsSubscribersSummaryData: StatsTimeIntervalData {
return SubscriberData(date: date, count: count)
}

let sorted = history.compactMap { $0 }.sorted(by: { $0.date.compare($1.date) == .orderedAscending })
let sorted = history.compactMap { $0 }.sorted { $0.date < $1.date }

self = .init(history: sorted, period: period, periodEndDate: date)
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/WordPressKit/Services/StatsServiceRemoteV2.swift
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ extension StatsTimeIntervalData {

// We'll bring `StatsPeriodUnit` into this file when the "old" `WPStatsServiceRemote` gets removed.
// For now we can piggy-back off the old type and add this as an extension.
extension StatsPeriodUnit {
public extension StatsPeriodUnit {
var stringValue: String {
switch self {
case .day:
Expand Down

0 comments on commit 1b31242

Please sign in to comment.