Skip to content

Commit 1249287

Browse files
Merge pull request NeuromatchAcademy#86 from NeuromatchAcademy/wrapstodon-range
expand wrapstodon range
2 parents b1021a1 + be7a0cb commit 1249287

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

app/lib/annual_report.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@ def self.current_campaign
2020
return unless Setting.wrapstodon
2121

2222
datetime = Time.now.utc
23-
datetime.year if datetime.month == 12 && (10..31).cover?(datetime.day)
23+
24+
if datetime.month == 12 && (10..31).cover?(datetime.day)
25+
datetime.year
26+
elsif datetime.month == 1
27+
datetime.year - 1
28+
end
2429
end
2530

2631
def initialize(account, year)

0 commit comments

Comments
 (0)