Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Rubyでさまざまな日付を取得するという奇妙な振る舞いに遭遇しました。
(Date.new(2012, 4, 1)..Date.today).select { |d| p d }作品
(Date.new(2012, 4, 1)..Date.today).select { |d| p d }
(Date.today..Date.new(2012, 4, 1)).select { |d| p d }失敗します。
(Date.today..Date.new(2012, 4, 1)).select { |d| p d }
何か案が?ありがとう!
範囲を逆方向に移動できないため、空の配列が返されます。