Merge pull request #230 from differentreality/cfp_weeks
change start_week.year to start_date.year
This commit is contained in:
commit
6763f57a68
1 changed files with 1 additions and 1 deletions
|
|
@ -14,7 +14,7 @@ class CallForPapers < ActiveRecord::Base
|
|||
# * +Integer+ -> start week
|
||||
def weeks
|
||||
result = end_week - start_week + 1
|
||||
weeks = Date.new(start_week.year, 12, 31).strftime('%W').to_i
|
||||
weeks = Date.new(start_date.year, 12, 31).strftime('%W').to_i
|
||||
result < 0 ? result + weeks : result
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue