Vidyalelo
Ruby Programming · Q9

Working with Dates and Times in Ruby

Programming · Ruby Programming · question 9

Q9

How do you convert a Date object to a string in Ruby?

A.
Use the parse method
B.
Use the stringify method
C.
Use the to_s method
Answer
D.
Use the convert_to_string method

Answer: Option C

Solution

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