<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/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>Javascript's getYear() function, and other IE headaches</title><link>http://msmvps.com/blogs/robfarley/archive/2006/10/26/Javascript_2700_s-getYear_28002900_-function_2C00_-and-other-IE-headaches.aspx</link><description>Someone I know came across this gem . I guess it&amp;#39;s well publicised, but if you haven&amp;#39;t come across it before, it could easily catch you out. The interesting thing is that IE will give you 2006 for getYear(). That&amp;#39;s wrong. It should give 106</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>re: Javascript's getYear() function, and other IE headaches</title><link>http://msmvps.com/blogs/robfarley/archive/2006/10/26/Javascript_2700_s-getYear_28002900_-function_2C00_-and-other-IE-headaches.aspx#210998</link><pubDate>Fri, 27 Oct 2006 00:05:29 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:210998</guid><dc:creator>Rob Farley</dc:creator><description>&lt;p&gt;Woah! I had looked at that page in Firefox, where it gives an answer of 106. I guess the source of the code prints it.&lt;/p&gt;
&lt;p&gt;Now that I look at that page in IE, it says 2006. I will correct my post. :| &lt;/p&gt;
&lt;p&gt;Thanks Alun.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=210998" width="1" height="1"&gt;</description></item><item><title>re: Javascript's getYear() function, and other IE headaches</title><link>http://msmvps.com/blogs/robfarley/archive/2006/10/26/Javascript_2700_s-getYear_28002900_-function_2C00_-and-other-IE-headaches.aspx#210386</link><pubDate>Thu, 26 Oct 2006 17:32:35 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:210386</guid><dc:creator>Alun Jones</dc:creator><description>&lt;p&gt;The link you quote demonstrates 2006 as being the correct response, and describes that dates before 1900 or after 1999 should produce a four-digit year.&lt;/p&gt;
&lt;p&gt;As you say, though getFullYear is the correct function.&lt;/p&gt;
&lt;p&gt;This arose because the designers of Javascript did not exactly specify the results that getYear should provide past 1999, leading to some browsers returning &amp;quot;06&amp;quot;, others returning &amp;quot;2006&amp;quot;, and some returning &amp;quot;106&amp;quot; - you can see occasional web sites even now telling you that the year is &amp;quot;19106&amp;quot; as a result.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=210386" width="1" height="1"&gt;</description></item></channel></rss>