<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>42 &#187; Date.civil</title>
	<atom:link href="http://www.42.mach7x.com/tag/datecivil/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.42.mach7x.com</link>
	<description>Thoughts and tips about programming with Ruby on Rails</description>
	<lastBuildDate>Wed, 01 Feb 2012 14:38:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>ArgumentError (3 elements of civil date are necessary)</title>
		<link>http://www.42.mach7x.com/2007/12/03/argumenterror-3-elements-of-civil-date-are-necessary/</link>
		<comments>http://www.42.mach7x.com/2007/12/03/argumenterror-3-elements-of-civil-date-are-necessary/#comments</comments>
		<pubDate>Mon, 03 Dec 2007 15:25:57 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[ActiveRecord]]></category>
		<category><![CDATA[Date]]></category>
		<category><![CDATA[Date.civil]]></category>
		<category><![CDATA[model]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/2007/12/03/argumenterror-3-elements-of-civil-date-are-necessary/</guid>
		<description><![CDATA[Problem On creating a default date on a model using the after create, and by using Model.date_field = &#8217;2007-01-01&#8242; we get the error ArgumentError (3 elements of civil date are necessary) Solution The workaround is to use: Model.date_field = Date.civil(2007,01,01)]]></description>
			<content:encoded><![CDATA[<p><b>Problem</b><br />
On creating a default date on a model using the after create, and by using <i>Model.date_field = &#8217;2007-01-01&#8242;</i> we get the error <i> ArgumentError (3 elements of civil date are necessary)</i></p>
<p><b>Solution</b><br />
The workaround is to use:</p>
<pre class="code">
Model.date_field = Date.civil(2007,01,01)
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2007/12/03/argumenterror-3-elements-of-civil-date-are-necessary/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

