Is it possible to quickly convert the value of strftime ("% u") to strftime ("% A") or do I need to build an equivalence hash, for example {"Monday" => 1, ......... "Sunday" => 6}
I have an Array with some day as decimal values
class_index=[2,6,7]
and I would like to skip this array to build and the array of days, like this
[nil, "Tuesday", nil, nil, nil, "Saturday", "Sunday"]
so i can do
class_list=[] class_index.each do |x| class_list[x-1] = convert x value to day name end
Is it possible?
source share