Prine’s Blog

Ruby problems with Date.parse.. (3 elements of civil date are necessary)

Verfasst von: fedoraswiss in: September 11, 2009

On older machines you get problems using Date.parse. The problem occured on a debian 4.0 machine with Ruby 1.8.5 installed.

Instead of using:

Date.parse("2008/03/07")

Use:

Date.strptime("2008/03/07", '%Y/%m/%d')