<?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>ramblings &#187; datetime</title>
	<atom:link href="http://techore.com/tag/datetime/feed/" rel="self" type="application/rss+xml" />
	<link>http://techore.com</link>
	<description>come to your own conclusions</description>
	<lastBuildDate>Mon, 30 Aug 2010 15:08:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>quickie: setting symfony datetime default</title>
		<link>http://techore.com/2010/01/quickie-setting-symfony-datetime-default/</link>
		<comments>http://techore.com/2010/01/quickie-setting-symfony-datetime-default/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 20:23:23 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[datetime]]></category>
		<category><![CDATA[fields]]></category>
		<category><![CDATA[form fields]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[quickie]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://techore.com/wp/?p=243</guid>
		<description><![CDATA[Setting the default value for a symfony form field is one of those tasks so simple that it's impossible to find out how to do it without a good bit of trial and error.  So without further ado, here is how to set a DateTime field's default value:
$this->widgetSchema['start_time']->setDefault(date("m/d/Y", now()));]]></description>
			<content:encoded><![CDATA[<p>Setting the default value for a symfony form field is one of those tasks so simple that it&#8217;s impossible to find out how to do it without a good bit of trial and error.  So without further ado, here is how to set a DateTime field&#8217;s default value:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">widgetSchema</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'start_time'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setDefault</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;m/d/Y&quot;</span><span style="color: #339933;">,</span> now<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Till Next Time</p>
]]></content:encoded>
			<wfw:commentRss>http://techore.com/2010/01/quickie-setting-symfony-datetime-default/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
