From: matt@... (matt neuburg) Date: 2009-04-11T00:35:03+09:00 Subject: Re: date formatting bug? Mark Volkmann wrote: > Why does the year get changed in this code? > > require 'date' > s = '2998-12-31' > date = Date.parse(s) > f = date.strftime('%d-%b-%G') It's because you asked for %G. If you wanted the actual year component of the date, you would have used %Y. man strftime... m. -- matt neuburg, phd = matt@tidbits.com, http://www.tidbits.com/matt/ Leopard - http://www.takecontrolbooks.com/leopard-customizing.html AppleScript - http://www.amazon.com/gp/product/0596102119 Read TidBITS! It's free and smart. http://www.tidbits.com