Hi, At Tue, 11 Aug 2009 00:47:44 +0900, Angel Pizarro wrote in [ruby-core:24851]: > Round trip errors for edge case dates: > > Jan 01 2008 > > Date.strptime(Date.parse("Jan 01, 2008").strftime("%Y%U") , "%Y%U") > ArgumentError: invalid date > > Dec 31, 2008 > > Date.strptime(Date.parse("Dec 31, 2008").strftime("%Y%W") , "%Y%W") > ArgumentError: invalid date %U and %W mean week numbers, so the results, "200800" and "200852" don't have enough info to determine their date. You need to include %w together. $ ruby -rdate -e 'p Date.strptime(Date.parse("Jan 01, 2008").strftime("%Y%U%w") , "%Y%U%w")' #<Date: 2008-01-01 (4908933/2,0,2299161)> $ ruby -rdate -e 'p Date.strptime(Date.parse("Dec 31, 2008").strftime("%Y%W%w") , "%Y%W%w")' #<Date: 2008-12-31 (4909663/2,0,2299161)> -- Nobu Nakada