Finding the week number

week_number = Time.now.strftime("%U") #=> 49

... or you can use the following:

require 'date'

DateTime.now.cweek  #=> 49

Resources