<?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: Date math for lazy people</title>
	<atom:link href="http://blog.flexexamples.com/2007/08/24/date-math-for-lazy-people/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2007/08/24/date-math-for-lazy-people/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Sat, 11 Feb 2012 11:51:51 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Tahir Azeem Alvi</title>
		<link>http://blog.flexexamples.com/2007/08/24/date-math-for-lazy-people/comment-page-1/#comment-8831</link>
		<dc:creator>Tahir Azeem Alvi</dc:creator>
		<pubDate>Wed, 12 Jan 2011 07:53:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/24/date-math-for-lazy-people/#comment-8831</guid>
		<description>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(“Mon Jan 17 2011″))

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(“Mon Jan 17 2011″))</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: Shailendra</title>
		<link>http://blog.flexexamples.com/2007/08/24/date-math-for-lazy-people/comment-page-1/#comment-8773</link>
		<dc:creator>Shailendra</dc:creator>
		<pubDate>Tue, 28 Dec 2010 07:18:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/24/date-math-for-lazy-people/#comment-8773</guid>
		<description>Thanx a tonne bro,.. you saved my life :D....!!!</description>
		<content:encoded><![CDATA[<p>Thanx a tonne bro,.. you saved my life :D&#8230;.!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2007/08/24/date-math-for-lazy-people/comment-page-1/#comment-8550</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Wed, 10 Nov 2010 23:22:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/24/date-math-for-lazy-people/#comment-8550</guid>
		<description>@greg,

Thanks for the follow up. I hadn&#039;t had a chance to look at it yet.

Re: &quot;Peter, love your blog. More like a “Help me! Adobe has totally bent the language up, and I don’t know where to…Oh, yeah. That Peter guy seems to always have the answer.”&quot;,

That actually made me laugh out loud (and not because I work at Adobe).

Peter</description>
		<content:encoded><![CDATA[<p>@greg,</p>
<p>Thanks for the follow up. I hadn&#8217;t had a chance to look at it yet.</p>
<p>Re: &#8220;Peter, love your blog. More like a “Help me! Adobe has totally bent the language up, and I don’t know where to…Oh, yeah. That Peter guy seems to always have the answer.”&#8221;,</p>
<p>That actually made me laugh out loud (and not because I work at Adobe).</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: greg</title>
		<link>http://blog.flexexamples.com/2007/08/24/date-math-for-lazy-people/comment-page-1/#comment-8549</link>
		<dc:creator>greg</dc:creator>
		<pubDate>Wed, 10 Nov 2010 23:13:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/24/date-math-for-lazy-people/#comment-8549</guid>
		<description>Man, I hate answering my own questions, well, in public anyway. 
I took a long-hand approach which works for finding the date of the first day of the week :

startDate = new Date();
var dow:int = startDate.day;
startDate = new Date(startDate.fullYear, startDate.month, startDate.date - dow);
endDate = new Date(startDate.fullYear, startDate.month, startDate.date + 6);

Peter, love your blog. More like a &quot;Help me! Adobe has totally bent the language up, and I don&#039;t know where to...Oh, yeah. That Peter guy seems to always have the answer.&quot;</description>
		<content:encoded><![CDATA[<p>Man, I hate answering my own questions, well, in public anyway.<br />
I took a long-hand approach which works for finding the date of the first day of the week :</p>
<p>startDate = new Date();<br />
var dow:int = startDate.day;<br />
startDate = new Date(startDate.fullYear, startDate.month, startDate.date &#8211; dow);<br />
endDate = new Date(startDate.fullYear, startDate.month, startDate.date + 6);</p>
<p>Peter, love your blog. More like a &#8220;Help me! Adobe has totally bent the language up, and I don&#8217;t know where to&#8230;Oh, yeah. That Peter guy seems to always have the answer.&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: greg</title>
		<link>http://blog.flexexamples.com/2007/08/24/date-math-for-lazy-people/comment-page-1/#comment-8548</link>
		<dc:creator>greg</dc:creator>
		<pubDate>Wed, 10 Nov 2010 22:44:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/24/date-math-for-lazy-people/#comment-8548</guid>
		<description>Cool add to for my utility bag. Thanks Peter! 
On an aside, I&#039;m trying to get start-of-week date with:

startDate = new Date();
startDate.date -= (startDate.day-1);

endDate = new Date();
endDate.date += (7-startDate.day);

but for example, today 11/10, I&#039;m getting 11/8 - 11/16 and I would&#039;ve thought it&#039; be 11/7 - 11/13
Anyone wanna set me straight?

Thx, 
Greg</description>
		<content:encoded><![CDATA[<p>Cool add to for my utility bag. Thanks Peter!<br />
On an aside, I&#8217;m trying to get start-of-week date with:</p>
<p>startDate = new Date();<br />
startDate.date -= (startDate.day-1);</p>
<p>endDate = new Date();<br />
endDate.date += (7-startDate.day);</p>
<p>but for example, today 11/10, I&#8217;m getting 11/8 &#8211; 11/16 and I would&#8217;ve thought it&#8217; be 11/7 &#8211; 11/13<br />
Anyone wanna set me straight?</p>
<p>Thx,<br />
Greg</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://blog.flexexamples.com/2007/08/24/date-math-for-lazy-people/comment-page-1/#comment-8219</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Sat, 14 Aug 2010 03:28:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/24/date-math-for-lazy-people/#comment-8219</guid>
		<description>@Peter: Thanks a lot!!!</description>
		<content:encoded><![CDATA[<p>@Peter: Thanks a lot!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2007/08/24/date-math-for-lazy-people/comment-page-1/#comment-8132</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Tue, 20 Jul 2010 07:23:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/24/date-math-for-lazy-people/#comment-8132</guid>
		<description>@Nirmal Kumar Bhogadi,

&lt;pre lang=&quot;mxml&quot;&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
                initialize=&quot;init();&quot;&gt;
    
    &lt;mx:Script&gt;
        &lt;![CDATA[
            protected function init():void {
                var now:Date = new Date();
                var lastWeek:Date = new Date(now.time);
                lastWeek.date -= 7;
                df1.selectedDate = now;
                df2.selectedDate = lastWeek;
            }
        ]]&gt;
    &lt;/mx:Script&gt;
    
    &lt;mx:DateField id=&quot;df1&quot; /&gt;
    &lt;mx:DateField id=&quot;df2&quot; /&gt;
    
&lt;/mx:Application&gt;
&lt;/pre&gt;

Peter</description>
		<content:encoded><![CDATA[<p>@Nirmal Kumar Bhogadi,</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Application</span> xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span></span>
<span style="color: #000000;">                initialize=<span style="color: #ff0000;">&quot;init();&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #339933;">&lt;mx:Script&gt;</span>
<span style="color: #339933;">        &lt;![CDATA[</span>
<span style="color: #339933;">            protected function init():void {</span>
<span style="color: #339933;">                var now:Date = new Date();</span>
<span style="color: #339933;">                var lastWeek:Date = new Date(now.time);</span>
<span style="color: #339933;">                lastWeek.date -= 7;</span>
<span style="color: #339933;">                df1.selectedDate = now;</span>
<span style="color: #339933;">                df2.selectedDate = lastWeek;</span>
<span style="color: #339933;">            }</span>
<span style="color: #339933;">        ]]&gt;</span>
<span style="color: #339933;">    &lt;/mx:Script&gt;</span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:DateField</span> id=<span style="color: #ff0000;">&quot;df1&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:DateField</span> id=<span style="color: #ff0000;">&quot;df2&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nirmal Kumar Bhogadi</title>
		<link>http://blog.flexexamples.com/2007/08/24/date-math-for-lazy-people/comment-page-1/#comment-8130</link>
		<dc:creator>Nirmal Kumar Bhogadi</dc:creator>
		<pubDate>Tue, 20 Jul 2010 04:41:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/24/date-math-for-lazy-people/#comment-8130</guid>
		<description>Hello All,

I have two DatesFields. One is Start Date and other is End Date. The start date is always the current date and the end date should be 7 days ago from the current date. Can someone help me in this respect?

Thanks,
Nirmal Kumar Bhogadi</description>
		<content:encoded><![CDATA[<p>Hello All,</p>
<p>I have two DatesFields. One is Start Date and other is End Date. The start date is always the current date and the end date should be 7 days ago from the current date. Can someone help me in this respect?</p>
<p>Thanks,<br />
Nirmal Kumar Bhogadi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Alvarez</title>
		<link>http://blog.flexexamples.com/2007/08/24/date-math-for-lazy-people/comment-page-1/#comment-7890</link>
		<dc:creator>Daniel Alvarez</dc:creator>
		<pubDate>Thu, 10 Jun 2010 14:50:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/24/date-math-for-lazy-people/#comment-7890</guid>
		<description>You made my day, thank you very much.... the only problem fullyear its witha a capital Y fullYear.... think somebody comment on that

excelent</description>
		<content:encoded><![CDATA[<p>You made my day, thank you very much&#8230;. the only problem fullyear its witha a capital Y fullYear&#8230;. think somebody comment on that</p>
<p>excelent</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2007/08/24/date-math-for-lazy-people/comment-page-1/#comment-6898</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Mon, 01 Feb 2010 04:52:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/24/date-math-for-lazy-people/#comment-6898</guid>
		<description>@Maria,

Sorry, I&#039;ve never used LiveCycle... You can try asking them how to structure the code/project in the Adobe LiveCycle blog at http://blogs.adobe.com/livecycle/.

Peter</description>
		<content:encoded><![CDATA[<p>@Maria,</p>
<p>Sorry, I&#8217;ve never used LiveCycle&#8230; You can try asking them how to structure the code/project in the Adobe LiveCycle blog at <a href="http://blogs.adobe.com/livecycle/" rel="nofollow">http://blogs.adobe.com/livecycle/</a>.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
</channel>
</rss>

