How Calculate The Day Of The Week Of A Date In Ruby

Check Date

Works on 2019-03-04 11:33:56+0800

Question

How calculate the day of the week of a date in ruby ?

Answer

require(‘date’)

today = date.today

today.wday

Reference

Published 4 Mar 2019

Bring the answer to lost vistor
MagicRabbit on Twitter