<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>Comments on: Flex 3: compare two dates</title>
	<atom:link href="/2009/05/12/flex-3-compare-two-dates/feed/" rel="self" type="application/rss+xml" />
	<link>/2009/05/12/flex-3-compare-two-dates/</link>
	<description>on web development</description>
	<lastBuildDate>Fri, 26 Oct 2018 21:40:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.0.3</generator>
	<item>
		<title>By: Marta</title>
		<link>/2009/05/12/flex-3-compare-two-dates/comment-page-1/#comment-16944</link>
		<dc:creator><![CDATA[Marta]]></dc:creator>
		<pubDate>Fri, 26 Oct 2012 21:10:06 +0000</pubDate>
		<guid isPermaLink="false">/?p=556#comment-16944</guid>
		<description><![CDATA[Maybe the next solution is the right one:
import mx.controls.DateField;
-----
&lt;pre lang=&quot;actionscript&quot;&gt;
var date1 :Date= DateField.stringToDate(&#039;2009&#039;,&quot;YYYY&quot;);	
var date2 :Date= DateField.stringToDate(&#039;1990&#039;,&quot;YYYY&quot;);	
if (date1.getTime() &lt; date2.getTime())
&lt;/pre&gt;
----
First of all, you have to convert correctly string to date;
Second, getTime(), Stoimene, not setTime()]]></description>
		<content:encoded><![CDATA[<p>Maybe the next solution is the right one:<br />
import mx.controls.DateField;<br />
&#8212;&#8211;</p>
<pre lang="actionscript">
var date1 :Date= DateField.stringToDate('2009',"YYYY");	
var date2 :Date= DateField.stringToDate('1990',"YYYY");	
if (date1.getTime() < date2.getTime())
</pre>
<p>----<br />
First of all, you have to convert correctly string to date;<br />
Second, getTime(), Stoimene, not setTime()</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Booma</title>
		<link>/2009/05/12/flex-3-compare-two-dates/comment-page-1/#comment-16422</link>
		<dc:creator><![CDATA[Booma]]></dc:creator>
		<pubDate>Fri, 03 Aug 2012 03:59:22 +0000</pubDate>
		<guid isPermaLink="false">/?p=556#comment-16422</guid>
		<description><![CDATA[Hi Mathew,

if( date1.toString() == date2.toString() ) { }  this code is not working...

I have written like the below.. but it always giving date1 and date 2 are equal...


public function compare (event:MouseEvent) : void {
				
				var date1:Date=new Date(&quot;02 AUG 2012&quot;);
				var date2:Date=new Date(&quot;01 AUG 2012&quot;);
				
				if(date1.toString()==date2.toString())
				{
					Alert.show(&quot;date1 is equal to date2&quot;);
				}
				else if(date1.toString()&#060;date2.toString())
				{
					Alert.show(&#034;Date1 is less than date2&#034;);
				}
				else
				{
					Alert.show(&#034;Date1 greater than date2&#034;);
				}
			}]]></description>
		<content:encoded><![CDATA[<p>Hi Mathew,</p>
<p>if( date1.toString() == date2.toString() ) { }  this code is not working&#8230;</p>
<p>I have written like the below.. but it always giving date1 and date 2 are equal&#8230;</p>
<p>public function compare (event:MouseEvent) : void {</p>
<p>				var date1:Date=new Date(&#8220;02 AUG 2012&#8221;);<br />
				var date2:Date=new Date(&#8220;01 AUG 2012&#8221;);</p>
<p>				if(date1.toString()==date2.toString())<br />
				{<br />
					Alert.show(&#8220;date1 is equal to date2&#8221;);<br />
				}<br />
				else if(date1.toString()&lt;date2.toString())<br />
				{<br />
					Alert.show(&quot;Date1 is less than date2&quot;);<br />
				}<br />
				else<br />
				{<br />
					Alert.show(&quot;Date1 greater than date2&quot;);<br />
				}<br />
			}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joel Backschat</title>
		<link>/2009/05/12/flex-3-compare-two-dates/comment-page-1/#comment-15100</link>
		<dc:creator><![CDATA[Joel Backschat]]></dc:creator>
		<pubDate>Thu, 02 Feb 2012 16:51:06 +0000</pubDate>
		<guid isPermaLink="false">/?p=556#comment-15100</guid>
		<description><![CDATA[Very nice!]]></description>
		<content:encoded><![CDATA[<p>Very nice!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Luke</title>
		<link>/2009/05/12/flex-3-compare-two-dates/comment-page-1/#comment-14451</link>
		<dc:creator><![CDATA[Matthew Luke]]></dc:creator>
		<pubDate>Wed, 12 Oct 2011 06:20:45 +0000</pubDate>
		<guid isPermaLink="false">/?p=556#comment-14451</guid>
		<description><![CDATA[if( date1.toString() == date2.toString() ) { } to test equality.  Use any other operators to make different comparisons]]></description>
		<content:encoded><![CDATA[<p>if( date1.toString() == date2.toString() ) { } to test equality.  Use any other operators to make different comparisons</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lenin.G</title>
		<link>/2009/05/12/flex-3-compare-two-dates/comment-page-1/#comment-14195</link>
		<dc:creator><![CDATA[Lenin.G]]></dc:creator>
		<pubDate>Fri, 18 Feb 2011 04:46:20 +0000</pubDate>
		<guid isPermaLink="false">/?p=556#comment-14195</guid>
		<description><![CDATA[i am new in flex..can u help me... how to compare two dates... i written function in to date of date field....anyone can suggest for my problem]]></description>
		<content:encoded><![CDATA[<p>i am new in flex..can u help me&#8230; how to compare two dates&#8230; i written function in to date of date field&#8230;.anyone can suggest for my problem</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tahir Azeem Alvi</title>
		<link>/2009/05/12/flex-3-compare-two-dates/comment-page-1/#comment-14150</link>
		<dc:creator><![CDATA[Tahir Azeem Alvi]]></dc:creator>
		<pubDate>Wed, 12 Jan 2011 07:47:27 +0000</pubDate>
		<guid isPermaLink="false">/?p=556#comment-14150</guid>
		<description><![CDATA[Hi,

i have a problem face from last day.

The problem is that i want to run a countdown Timer. The timer is start from two dates
1. current date (as New Date()).
2. the immediate Monday (as new Date(&quot;Mon Jan 17 2011&quot;))

The problem is with 2nd date.

How i dynamically find the next Monday date ?.


Thanks and welcome for Help.]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>i have a problem face from last day.</p>
<p>The problem is that i want to run a countdown Timer. The timer is start from two dates<br />
1. current date (as New Date()).<br />
2. the immediate Monday (as new Date(&#8220;Mon Jan 17 2011&#8221;))</p>
<p>The problem is with 2nd date.</p>
<p>How i dynamically find the next Monday date ?.</p>
<p>Thanks and welcome for Help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: self fish</title>
		<link>/2009/05/12/flex-3-compare-two-dates/comment-page-1/#comment-12745</link>
		<dc:creator><![CDATA[self fish]]></dc:creator>
		<pubDate>Wed, 31 Mar 2010 15:20:57 +0000</pubDate>
		<guid isPermaLink="false">/?p=556#comment-12745</guid>
		<description><![CDATA[@onir - It&#039;s working man]]></description>
		<content:encoded><![CDATA[<p>@onir &#8211; It&#8217;s working man</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: onir</title>
		<link>/2009/05/12/flex-3-compare-two-dates/comment-page-1/#comment-12613</link>
		<dc:creator><![CDATA[onir]]></dc:creator>
		<pubDate>Wed, 17 Mar 2010 14:27:09 +0000</pubDate>
		<guid isPermaLink="false">/?p=556#comment-12613</guid>
		<description><![CDATA[I&#039;m not sure I manage this  work. Can help please?]]></description>
		<content:encoded><![CDATA[<p>I&#8217;m not sure I manage this  work. Can help please?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stoimen</title>
		<link>/2009/05/12/flex-3-compare-two-dates/comment-page-1/#comment-9825</link>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
		<pubDate>Mon, 30 Nov 2009 08:48:55 +0000</pubDate>
		<guid isPermaLink="false">/?p=556#comment-9825</guid>
		<description><![CDATA[Hi,

I&#039;m not sure you can achieve this with some built in functionality of Flex. You&#039;d better make a method to do that. It should check for weekends and exclude them, so when you pass two dates it can check the number of week days.

greetings,
stoimen]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I&#8217;m not sure you can achieve this with some built in functionality of Flex. You&#8217;d better make a method to do that. It should check for weekends and exclude them, so when you pass two dates it can check the number of week days.</p>
<p>greetings,<br />
stoimen</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pmani</title>
		<link>/2009/05/12/flex-3-compare-two-dates/comment-page-1/#comment-9824</link>
		<dc:creator><![CDATA[pmani]]></dc:creator>
		<pubDate>Mon, 30 Nov 2009 08:36:25 +0000</pubDate>
		<guid isPermaLink="false">/?p=556#comment-9824</guid>
		<description><![CDATA[i am new for flex ,can u help me?
i want to  find the number of dates from one date to another except saturday and sunday(ex:number of dates is 7 means ,today is starting date(11/30/2009) the end date should be 12/8/2009 (exclude sundays and saturday)]]></description>
		<content:encoded><![CDATA[<p>i am new for flex ,can u help me?<br />
i want to  find the number of dates from one date to another except saturday and sunday(ex:number of dates is 7 means ,today is starting date(11/30/2009) the end date should be 12/8/2009 (exclude sundays and saturday)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
