将数字日期转换为工作日

convert numerical date to weekdays

有没有办法在不写日历的情况下将数字日期转换为工作日?我想从:"11/01/2015""Sun 11"

这里有一个方法

[arup@ruby]$ irb
>> require 'date'
=> true
>> Date.strptime("11/01/2015", "%d/%m/%Y")
=> #<Date: 2015-01-11 ((2457034j,0s,0n),+0s,2299161j)>
>> Date.strptime("11/01/2015", "%d/%m/%Y").strftime("%a %d")
=> "Sun 11"

考虑一下:

>> require 'date'
=> true
>> Date.parse("11/01/2015").strftime("%a %d")                                                     
=> "Sun 11"