From: Christophe Grandsire Date: 2005-09-15T14:09:03+09:00 Subject: Re: How do I convert an int to a date? dlehman@gmail.com wrote: > I have an int (which is actually a Julian Day Number value) which I > want to convert to an actual date value. How do i do this? > > ..to_date() does not do what I want, but there must be something like > this. I'm just not sure what to look for. > > Is the class method Date::jd what you're looking for? It takes a Julian Day Number and returns a Date object. It has an optional parameter for the Day of Calendar Reform (defaults to Date::ITALY, but you can also use Date::England). Once you have the Date object, you can use its methods to convert to any shape you want :) . You should check the Date methods at http://www.ruby-doc.org/core/ . I'm pretty sure you'll find there exactly what you need. -- Christophe Grandsire. http://rainbow.conlang.free.fr You need a straight mind to invent a twisted conlang.