Вы можете сделать следующее:
require 'date'
@year = 2001 #year you want to count the number of weeks
d = Date.new @year, 12, 30 # as in Date.new
d.cweek # returns the commercial week number for the last week of the year, in this case, 52
если это то, что вы ищете :)
PS: это работает только в коммерческом году, поэтому в 2001 году 31 декабря была фактически коммерческой неделей 1