alternative to creating date from string, for ruby 1.8 and 1.9