<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Rails Forum - Ruby on Rails Help and Discussion Forum - Difference in years]]></title>
		<link>http://railsforum.com/viewtopic.php?id=1146</link>
		<description><![CDATA[The most recent posts in Difference in years.]]></description>
		<lastBuildDate>Thu, 09 Nov 2006 17:36:55 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Difference in years]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=5719#p5719</link>
			<description><![CDATA[<p>Hosting with TextDrive and I have no idea what I&#039;m doing :-)</p><p>My other site is all ColdFusion and Fusebox: <a href="http://www.checkpointzero.com">http://www.checkpointzero.com</a></p><p>I went to a ROR bootcamp a couple months ago and built most of RaceBucket in class. Been tinkering since. Signed up for TextDrive and spent the last few weeks figuring out how to get the site running on lighttpd without getting killed by their watchdog script due to memory leaks. Doing pretty good lately though with no load at all.</p><p>Just sent an email to about 25 folks to register and click around. We&#039;ll see how it holds up. Still need to do some work around form validation.</p>]]></description>
			<author><![CDATA[dummy@example.com (Yak)]]></author>
			<pubDate>Thu, 09 Nov 2006 17:36:55 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=5719#p5719</guid>
		</item>
		<item>
			<title><![CDATA[Re: Difference in years]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=5718#p5718</link>
			<description><![CDATA[<p>Looks great! Feels very fast too, what host are you using?</p><p>BTW, if you needed to calculate the birthday to see if someone was old enough, try this:</p><p><pre name="code" class="ruby:nogutter">if birthday.to_time &gt; 13.years.ago<br />&nbsp; # too young<br />else<br />&nbsp; #...<br />end</pre></p>]]></description>
			<author><![CDATA[dummy@example.com (ryanb)]]></author>
			<pubDate>Thu, 09 Nov 2006 17:33:34 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=5718#p5718</guid>
		</item>
		<item>
			<title><![CDATA[Re: Difference in years]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=5716#p5716</link>
			<description><![CDATA[<p>I wasn&#039;t aware of floor so no...I didn&#039;t try it. </p><p>Just did now...perfect and done. Still plenty of work to do, but I&#039;m far enough along that I&#039;m going to let people start playing with the site.</p><p><a href="http://www.racebucket.com/home/show">http://www.racebucket.com/home/show</a></p><p>Love to get your feedback, but be gentle...my first ROR site...and the CSS needs some...originality. It&#039;s a shameless, borrow/steal/copy job for now :-)</p>]]></description>
			<author><![CDATA[dummy@example.com (Yak)]]></author>
			<pubDate>Thu, 09 Nov 2006 17:22:17 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=5716#p5716</guid>
		</item>
		<item>
			<title><![CDATA[Re: Difference in years]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=5714#p5714</link>
			<description><![CDATA[<p>Have you tried floor? This will round down:</p><p><pre name="code" class="ruby:nogutter">((Time.now - birthday.to_time)/1.year).floor</pre><br />If that doesn&#039;t work, perhaps you could provide an example of the input birthday and what result you are expecting.</p>]]></description>
			<author><![CDATA[dummy@example.com (ryanb)]]></author>
			<pubDate>Thu, 09 Nov 2006 17:15:42 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=5714#p5714</guid>
		</item>
		<item>
			<title><![CDATA[Re: Difference in years]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=5712#p5712</link>
			<description><![CDATA[<p>You should be on the payroll. Thanks man.</p><p>So last issue is accurately calculating the users age. Right now it&#039;s off by 1 if the users birthday has already passed in the current year.</p><p>In that case I&#039;ll need to subtract 1. So to do that I need to compare the month/day portion of their birthday to the current date. As in:</p><p>unless (month/day part of birthday) &gt; (month/day part of now)<br />&nbsp; subtract 1<br />end</p><p>Feel like wasting any more of your time on a newb to show me how you&#039;d do that?</p><p>This is actually the last issue I need to smooth out before I&#039;m going to open the site to a few friends to test :-)</p>]]></description>
			<author><![CDATA[dummy@example.com (Yak)]]></author>
			<pubDate>Thu, 09 Nov 2006 17:13:11 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=5712#p5712</guid>
		</item>
		<item>
			<title><![CDATA[Re: Difference in years]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=5710#p5710</link>
			<description><![CDATA[<p>((Time.now - birthday.to_time)/1.year).round</p><p>You can also use floor/ceil.</p>]]></description>
			<author><![CDATA[dummy@example.com (ryanb)]]></author>
			<pubDate>Thu, 09 Nov 2006 17:03:34 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=5710#p5710</guid>
		</item>
		<item>
			<title><![CDATA[Re: Difference in years]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=5709#p5709</link>
			<description><![CDATA[<p>Perfect. Thanks so much. How do I round to a whole number?</p>]]></description>
			<author><![CDATA[dummy@example.com (Yak)]]></author>
			<pubDate>Thu, 09 Nov 2006 17:02:51 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=5709#p5709</guid>
		</item>
		<item>
			<title><![CDATA[Re: Difference in years]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=5708#p5708</link>
			<description><![CDATA[<p>Try this:</p><p><pre name="code" class="ruby:nogutter">(Time.now - birthday.to_time)/1.year</pre></p>]]></description>
			<author><![CDATA[dummy@example.com (ryanb)]]></author>
			<pubDate>Thu, 09 Nov 2006 16:59:29 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=5708#p5708</guid>
		</item>
		<item>
			<title><![CDATA[Difference in years]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=5693#p5693</link>
			<description><![CDATA[<p>I have each users birthday. Need to display how old they are in years. Anyone got a code sample?</p>]]></description>
			<author><![CDATA[dummy@example.com (Yak)]]></author>
			<pubDate>Thu, 09 Nov 2006 15:21:55 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=5693#p5693</guid>
		</item>
	</channel>
</rss>
