<?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>html &#8211; Robert&#039;s private homepage</title>
	<atom:link href="http://rehner.org/archives/category/coding/html/feed" rel="self" type="application/rss+xml" />
	<link>http://rehner.org</link>
	<description></description>
	<lastBuildDate>Mon, 22 Jun 2015 14:40:13 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Check Flight Prices for Next Week</title>
		<link>http://rehner.org/archives/132</link>
		
		<dc:creator><![CDATA[Robert]]></dc:creator>
		<pubDate>Mon, 22 Jun 2015 14:19:05 +0000</pubDate>
				<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<guid isPermaLink="false">http://rehner.org/?p=132</guid>

					<description><![CDATA[Someone asked if it is possible to view the flight prices for next week. Obviously one could go to a website like kayak, input the flight dates and view the prices. But, if you want to do this every day &#8230; <a href="http://rehner.org/archives/132">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>Someone asked if it is possible to view the flight prices for next week. Obviously one could go to a website like kayak, input the flight dates and view the prices. But, if you want to do this every day you will have to enter the dates every day. Therefore I came up with a simple script which produces a website with a link that opens up a kayak searh for a flight in 7 days from now.<span id="more-132"></span></p>
<p>In this example it searches for a flexible (+-2 days) return flight is from FRA to NYC with a 5 day stay in New York.</p>
<pre class="brush: jscript; html-script: true; title: ; notranslate">

&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;body&gt;

&lt;p id=&quot;demo&quot;&gt;&lt;/p&gt;

&lt;script&gt;
var date = new Date();
var dateEnd = new Date();

date.setTime(date.getTime() + 7*24*60*60*1000); // in 7 days from now
dateEnd.setTime(date.getTime() + 5*24*60*60*1000); // travel for 5 days

// zero padding and +1 because javascript counts months from 0
var d = (&quot;00&quot; + date.getDate()).slice(-2);
var m = (&quot;00&quot; + (date.getMonth()+1)).slice(-2);
var y = date.getFullYear();

var de = (&quot;00&quot; + dateEnd.getDate()).slice(-2);
var me = (&quot;00&quot; + (dateEnd.getMonth()+1)).slice(-2);
var ye = dateEnd.getFullYear();

document.getElementById(&quot;demo&quot;).innerHTML = &quot;&lt;a href=http://www.kayak.de/flights/FRA-NYC/&quot;+y+&quot;-&quot;+m+&quot;-&quot;+d+&quot;-flexible/&quot;+ye+&quot;-&quot;+me+&quot;-&quot;+de+&quot;-flexible&gt;Link to KAYAK +7 days&lt;/a&gt;&quot;;
&lt;/script&gt;

&lt;/body&gt;
&lt;/html&gt;

</pre>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
