Vidyalelo
Ruby Programming · Q33

Working with Dates and Times in Ruby

Programming · Ruby Programming · question 33

Q33

How do you find the number of weeks in the current year in Ruby?

A.
Time.now.weeks_in_year
B.
DateTime.current.weeks_in_year
C.
Date.today.weeks_in_year
Answer
D.
Date.today.days_in_year

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board