Skip to content

Commit e91551b

Browse files
committed
Decided to do Modulous 13, fixed issue sf-wdi-25#2
1 parent 3c49df5 commit e91551b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/archives_sidebar/lib/archives_sidebar.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ def parse_request(_contents, _params)
3030
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])
3131

3232
@archives = article_counts.map do |entry|
33-
month = (entry.month.to_i%12)+1
33+
month = (entry.month.to_i%13)
3434
year = entry.year.to_i
3535
{
3636
name: I18n.l(Date.new(year, month), format: '%B %Y'),
37-
month: month - 1,
37+
month: month,
3838
year: year,
3939
article_count: entry.count
4040
}

0 commit comments

Comments
 (0)