diff --git a/lib/archives_sidebar/lib/archives_sidebar.rb b/lib/archives_sidebar/lib/archives_sidebar.rb index 9a5e879cb..74655138c 100644 --- a/lib/archives_sidebar/lib/archives_sidebar.rb +++ b/lib/archives_sidebar/lib/archives_sidebar.rb @@ -30,7 +30,7 @@ def parse_request(_contents, _params) article_counts = Content.find_by_sql(["select count(*) as count, #{date_func} from contents where type='Article' and published = ? and published_at < ? group by year,month order by year desc,month desc limit ? ", true, Time.now, count.to_i]) @archives = article_counts.map do |entry| - month = (entry.month.to_i%13) + month = entry.month.to_i year = entry.year.to_i { name: I18n.l(Date.new(year, month), format: '%B %Y'),