code: def weekofyear(self, first_day_of_week=SATURDAY):
          
          first_day_of_year = self.firstdayofyear()
          days = (self - first_day_of_year).days
          offset = first_day_of_week - first_day_of_year.weekday()
          if offset < 0:
              offset += 7
  
          if days < offset:
              return 0
  
          return int((days - offset) / 7 + 1)
docs: weekofyear(first_day_of_week=SATURDAY)
  
          :param first_day_of_week: One of the
                  :py:data:`khayyam.SATURDAY`,
                  :py:data:`khayyam.SUNDAY`,
                  :py:data:`khayyam.MONDAY`,
                  :py:data:`khayyam.TUESDAY`,
                  :py:data:`khayyam.WEDNESDAY`,
                  :py:data:`khayyam.THURSDAY` or
                  :py:data:`khayyam.FRIDAY`
          :return: The week number of the year.
          :rtype: int