Vidyalelo
Ruby Programming · Q2

Working with Dates and Times in Ruby

Programming · Ruby Programming · question 2

Q2

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

A.
Returns the year of the Time object
B.
Formats a Time object into a string according to the specified format
Answer
C.
Returns the day of the week of the Time object
D.
None of the above

Answer: Option B

Solution

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