Examveda

Which method is used to calculate the difference in years between two Date objects in Ruby?

A. years_between

B. years_difference

C. difference_in_years

D. subtract_years

Answer: Option C


Join The Discussion

Related Questions on Working with Dates and Times in Ruby