Vidyalelo
Ruby Programming · Q11

Working with Dates and Times in Ruby

Programming · Ruby Programming · question 11

Q11

What does the to_date method do when applied to a Time object in Ruby?

A.
Converts a Time object to a Date object
Answer
B.
Converts a Time object to a string
C.
Converts a Time object to a number of seconds since the Unix epoch
D.
Converts a Time object to a number of milliseconds since the Unix epoch

Answer: Option A

Solution

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