<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Setting a date 5 days previous to today</title><link>https://www.infopathdev.com:443/forums/thread/14740.aspx</link><pubDate>Thu, 03 Aug 2006 23:38:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14740</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14740.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14740</wfw:commentRss><description>Thanks for sharing this. If you ever make the transition to using managed code (i.e. C# or VB.NET) coding date math is much easier!</description></item><item><title>Re: Setting a date 5 days previous to today</title><link>https://www.infopathdev.com:443/forums/thread/14739.aspx</link><pubDate>Thu, 03 Aug 2006 21:24:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14739</guid><dc:creator>bwilbourne</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14739.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14739</wfw:commentRss><description>Actually, after digging and testing, this code works &lt;br /&gt;&lt;br /&gt;var d=new Date()&lt;br /&gt;d.setDate( d.getDate()-5 );&lt;br /&gt;var day=d.getDate()+ "/";&lt;br /&gt;var month=(d.getMonth() + 1)+ "/";&lt;br /&gt;var year=d.getFullYear();&lt;br /&gt;</description></item><item><title>Setting a date 5 days previous to today</title><link>https://www.infopathdev.com:443/forums/thread/12925.aspx</link><pubDate>Thu, 03 Aug 2006 19:58:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12925</guid><dc:creator>bwilbourne</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12925.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12925</wfw:commentRss><description>I am trying to capture the date and subtract 5 days from it.  I thought that JScript would automatically roll back to a previous month automatically.  My code does not seem to work, the value comes back as blank.  Any ideas on what is wrong with this function?&lt;br /&gt;&lt;br /&gt;function showNextWeek(){&lt;br /&gt;dtNextWeek = new Date();&lt;br /&gt;dtNextWeek.setDate( dtNextWeek.getDate()-5 );&lt;br /&gt;alert( dtNextWeek );&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;</description></item></channel></rss>