<?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>Albertech.net &#187; ereg</title>
	<atom:link href="http://albertech.net/tag/ereg/feed/" rel="self" type="application/rss+xml" />
	<link>http://albertech.net</link>
	<description>Tips, Tricks, and Reviews in Linux, Apache, MySQL, PHP</description>
	<lastBuildDate>Wed, 28 Jul 2010 16:09:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Validate MySQL date format in PHP</title>
		<link>http://albertech.net/2009/01/validate-mysql-date-format-in-php/</link>
		<comments>http://albertech.net/2009/01/validate-mysql-date-format-in-php/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 20:32:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[ereg]]></category>
		<category><![CDATA[mysql date validation]]></category>
		<category><![CDATA[php 6]]></category>
		<category><![CDATA[preg_match]]></category>

		<guid isPermaLink="false">http://albertech.net/?p=54</guid>
		<description><![CDATA[Validating the date in MySQL should be done using preg_match since ereg_* functions will be removed in PHP 6.

<strong>More info on PHP 6 changes</strong>: <a href="http://wiki.php.net/todo/php60">http://wiki.php.net/todo/php60</a> It appears there will be a module that you can use to utilize existing ereg expressions, so that'll buy some time to port code from ereg* to preg*.
function isValidDate($date){

if (preg_match ("/^([0-9]{4})-([0-9]{2})-([0-9]{2})$/", $date))
{

return true;
}
else{
return false;
}

}]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Falbertech.net%252F2009%252F01%252Fvalidate-mysql-date-format-in-php%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Validate%20MySQL%20date%20format%20in%20PHP%22%20%7D);"></div>
<p>Validating the date in MySQL should be done using preg_match since ereg_* functions will be removed in PHP 6.</p>
<p><strong>More info on PHP 6 changes</strong>: <a href="http://wiki.php.net/todo/php60">http://wiki.php.net/todo/php60</a> It appears there will be a module that you can use to utilize existing ereg expressions, so that&#8217;ll buy some time to port code from ereg* to preg*.<br />
function isValidDate($date){</p>
<p>if (preg_match (&#8220;/^([0-9]{4})-([0-9]{2})-([0-9]{2})$/&#8221;, $date))<br />
{</p>
<p>return true;<br />
}<br />
else{<br />
return false;<br />
}</p>
<p>}</p>

]]></content:encoded>
			<wfw:commentRss>http://albertech.net/2009/01/validate-mysql-date-format-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
