We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee5c694 commit d639167Copy full SHA for d639167
CCCApi/Sources/CCCApi/ApiService.swift
@@ -81,8 +81,8 @@ public class ApiService {
81
// The 'popular' API call returns talks that were popular by year.
82
// Right after the beginning of a new year, it doesn't return anything
83
// presumably because there aren't enough views on talk for that year yet.
84
- // So here, we use the year that it was one week ago.
85
- let date = calendar.date(byAdding: .weekOfYear, value: -1, to: Date.now) ?? Date.now
+ // So here, we use the year that it was two weeks ago.
+ let date = calendar.date(byAdding: .weekOfYear, value: -2, to: Date.now) ?? Date.now
86
return calendar.component(.year, from: date)
87
case let .year(value):
88
return value
0 commit comments