<?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: Recursive &#8220;pretty date&#8221;</title>
	<atom:link href="http://james.padolsey.com/javascript/recursive-pretty-date/feed/" rel="self" type="application/rss+xml" />
	<link>http://james.padolsey.com/javascript/recursive-pretty-date/</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 02 Feb 2012 18:03:26 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
	<item>
		<title>By: Matt</title>
		<link>http://james.padolsey.com/javascript/recursive-pretty-date/comment-page-1/#comment-16862</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Tue, 21 Jul 2009 14:43:50 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=1022#comment-16862</guid>
		<description>Hi James,

Can u explain the pros and cons of writing your code like you wrote and like this:

&lt;pre lang=&quot;javascript&quot;&gt;
function niceTime(time) {

    var ints = {
        second: 1,
        minute: 60,
        hour: 3600,
        day: 86400,
        week: 604800,
        month: 2592000,
        year: 31536000
    };
 
    time = +new Date(time);

    var gap = ((+new Date()) - time) / 1000,
        amount, measure;

    for (var i in ints) {
        if (gap &gt; ints[i]) { measure = i; }
    }

    amount = gap / ints[measure];
    amount = gap &gt; ints.day ? (Math.round(amount * 100) / 100) : Math.round(amount);
    amount += &#039; &#039; + measure + (amount &gt; 1 ? &#039;s&#039; : &#039;&#039;) + &#039; ago&#039;;

    return amount; 
};
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Hi James,</p>
<p>Can u explain the pros and cons of writing your code like you wrote and like this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span class="kw2">function</span> niceTime<span class="br0">&#40;</span>time<span class="br0">&#41;</span> <span class="br0">&#123;</span>
&nbsp;
    <span class="kw2">var</span> ints <span class="sy0">=</span> <span class="br0">&#123;</span>
        second<span class="sy0">:</span> <span class="nu0">1</span><span class="sy0">,</span>
        minute<span class="sy0">:</span> <span class="nu0">60</span><span class="sy0">,</span>
        hour<span class="sy0">:</span> <span class="nu0">3600</span><span class="sy0">,</span>
        day<span class="sy0">:</span> <span class="nu0">86400</span><span class="sy0">,</span>
        week<span class="sy0">:</span> <span class="nu0">604800</span><span class="sy0">,</span>
        month<span class="sy0">:</span> <span class="nu0">2592000</span><span class="sy0">,</span>
        year<span class="sy0">:</span> <span class="nu0">31536000</span>
    <span class="br0">&#125;</span><span class="sy0">;</span>
&nbsp;
    time <span class="sy0">=</span> <span class="sy0">+</span><span class="kw2">new</span> Date<span class="br0">&#40;</span>time<span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
    <span class="kw2">var</span> gap <span class="sy0">=</span> <span class="br0">&#40;</span><span class="br0">&#40;</span><span class="sy0">+</span><span class="kw2">new</span> Date<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="sy0">-</span> time<span class="br0">&#41;</span> <span class="sy0">/</span> <span class="nu0">1000</span><span class="sy0">,</span>
        amount<span class="sy0">,</span> measure<span class="sy0">;</span>
&nbsp;
    <span class="kw1">for</span> <span class="br0">&#40;</span><span class="kw2">var</span> i <span class="kw1">in</span> ints<span class="br0">&#41;</span> <span class="br0">&#123;</span>
        <span class="kw1">if</span> <span class="br0">&#40;</span>gap <span class="sy0">&amp;</span>gt<span class="sy0">;</span> ints<span class="br0">&#91;</span>i<span class="br0">&#93;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span> measure <span class="sy0">=</span> i<span class="sy0">;</span> <span class="br0">&#125;</span>
    <span class="br0">&#125;</span>
&nbsp;
    amount <span class="sy0">=</span> gap <span class="sy0">/</span> ints<span class="br0">&#91;</span>measure<span class="br0">&#93;</span><span class="sy0">;</span>
    amount <span class="sy0">=</span> gap <span class="sy0">&amp;</span>gt<span class="sy0">;</span> ints.<span class="me1">day</span> <span class="sy0">?</span> <span class="br0">&#40;</span>Math.<span class="me1">round</span><span class="br0">&#40;</span>amount <span class="sy0">*</span> <span class="nu0">100</span><span class="br0">&#41;</span> <span class="sy0">/</span> <span class="nu0">100</span><span class="br0">&#41;</span> <span class="sy0">:</span> Math.<span class="me1">round</span><span class="br0">&#40;</span>amount<span class="br0">&#41;</span><span class="sy0">;</span>
    amount <span class="sy0">+=</span> <span class="st0">' '</span> <span class="sy0">+</span> measure <span class="sy0">+</span> <span class="br0">&#40;</span>amount <span class="sy0">&amp;</span>gt<span class="sy0">;</span> <span class="nu0">1</span> <span class="sy0">?</span> <span class="st0">'s'</span> <span class="sy0">:</span> <span class="st0">''</span><span class="br0">&#41;</span> <span class="sy0">+</span> <span class="st0">' ago'</span><span class="sy0">;</span>
&nbsp;
    <span class="kw1">return</span> amount<span class="sy0">;</span> 
<span class="br0">&#125;</span><span class="sy0">;</span></pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://james.padolsey.com/javascript/recursive-pretty-date/comment-page-1/#comment-16837</link>
		<dc:creator>David</dc:creator>
		<pubDate>Tue, 21 Jul 2009 09:33:08 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=1022#comment-16837</guid>
		<description>@James: Doh, sorry! I made the stupid mistake in the code of assuming that aTime is less than bTime. Inserting this line after assignment of aTime and bTime solves the problem:
&lt;pre lang=&quot;javascript&quot;&gt;
if (aTime &gt; bTime) return arguments.callee(bTime,aTime);
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>@James: Doh, sorry! I made the stupid mistake in the code of assuming that aTime is less than bTime. Inserting this line after assignment of aTime and bTime solves the problem:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span class="kw1">if</span> <span class="br0">&#40;</span>aTime <span class="sy0">&amp;</span>gt<span class="sy0">;</span> bTime<span class="br0">&#41;</span> <span class="kw1">return</span> arguments.<span class="me1">callee</span><span class="br0">&#40;</span>bTime<span class="sy0">,</span>aTime<span class="br0">&#41;</span><span class="sy0">;</span></pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://james.padolsey.com/javascript/recursive-pretty-date/comment-page-1/#comment-16836</link>
		<dc:creator>James</dc:creator>
		<pubDate>Tue, 21 Jul 2009 08:49:05 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=1022#comment-16836</guid>
		<description>Nice work David! I always forget about the native Date methods... Some of them are actually quite useful. I can&#039;t quite get your solution to work though; it seems to work with past dates but, for example, I can&#039;t get it to work with:

&lt;pre lang=&quot;javascript&quot;&gt;
prettyAccurateTimeDiff( &quot;January 1, 3000&quot; );
&lt;/pre&gt;

@Ricky, yup, it&#039;s deprecated; I have no idea why though, there really is no better alternative unless you want to use a named function within the closure and then return it by its identifier. I agree with Ben though; I doubt it&#039;ll be released from implementations because so much code on the web depends on it.</description>
		<content:encoded><![CDATA[<p>Nice work David! I always forget about the native Date methods&#8230; Some of them are actually quite useful. I can&#8217;t quite get your solution to work though; it seems to work with past dates but, for example, I can&#8217;t get it to work with:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">prettyAccurateTimeDiff<span class="br0">&#40;</span> <span class="st0">&quot;January 1, 3000&quot;</span> <span class="br0">&#41;</span><span class="sy0">;</span></pre></div></div>

<p>@Ricky, yup, it&#8217;s deprecated; I have no idea why though, there really is no better alternative unless you want to use a named function within the closure and then return it by its identifier. I agree with Ben though; I doubt it&#8217;ll be released from implementations because so much code on the web depends on it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://james.padolsey.com/javascript/recursive-pretty-date/comment-page-1/#comment-16834</link>
		<dc:creator>David</dc:creator>
		<pubDate>Tue, 21 Jul 2009 08:26:55 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=1022#comment-16834</guid>
		<description>Doh, return statement could be simplified to this, which would also eliminate some unnecessary recursion: 

&lt;pre lang=&quot;javascript&quot;&gt;
return (amount ? amount + &quot; &quot; + diffnames[diff] + (amount&gt;1?&quot;s&quot;:&quot;&quot;) : &quot;&quot;) + 
       (+bTime - +iTime &gt; 1000 &amp;&amp; diff+1 &lt; diffs.length ? &quot;, &quot;+arguments.callee(iTime,bTime,diff+1) : &quot;&quot;);
&lt;/pre&gt;

Still with messed-up special characters, sorry. :P</description>
		<content:encoded><![CDATA[<p>Doh, return statement could be simplified to this, which would also eliminate some unnecessary recursion:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span class="kw1">return</span> <span class="br0">&#40;</span>amount <span class="sy0">?</span> amount <span class="sy0">+</span> <span class="st0">&quot; &quot;</span> <span class="sy0">+</span> diffnames<span class="br0">&#91;</span>diff<span class="br0">&#93;</span> <span class="sy0">+</span> <span class="br0">&#40;</span>amount<span class="sy0">&amp;</span>gt<span class="sy0">;</span><span class="nu0">1</span><span class="sy0">?</span><span class="st0">&quot;s&quot;</span><span class="sy0">:</span><span class="st0">&quot;&quot;</span><span class="br0">&#41;</span> <span class="sy0">:</span> <span class="st0">&quot;&quot;</span><span class="br0">&#41;</span> <span class="sy0">+</span> 
       <span class="br0">&#40;</span><span class="sy0">+</span>bTime <span class="sy0">-</span> <span class="sy0">+</span>iTime <span class="sy0">&amp;</span>gt<span class="sy0">;</span> <span class="nu0">1000</span> <span class="sy0">&amp;</span>amp<span class="sy0">;&amp;</span>amp<span class="sy0">;</span> diff<span class="sy0">+</span><span class="nu0">1</span> <span class="sy0">&amp;</span>lt<span class="sy0">;</span> diffs.<span class="me1">length</span> <span class="sy0">?</span> <span class="st0">&quot;, &quot;</span><span class="sy0">+</span>arguments.<span class="me1">callee</span><span class="br0">&#40;</span>iTime<span class="sy0">,</span>bTime<span class="sy0">,</span>diff<span class="sy0">+</span><span class="nu0">1</span><span class="br0">&#41;</span> <span class="sy0">:</span> <span class="st0">&quot;&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span></pre></div></div>

<p>Still with messed-up special characters, sorry. <img src='http://james.padolsey.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://james.padolsey.com/javascript/recursive-pretty-date/comment-page-1/#comment-16803</link>
		<dc:creator>David</dc:creator>
		<pubDate>Mon, 20 Jul 2009 19:33:14 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=1022#comment-16803</guid>
		<description>@James

We can use the date objects&#039; get/set methods to avoid having to define year and month in seconds. That way, we get pretty and accurate!

&lt;pre lang=&quot;javascript&quot;&gt;
var prettyAccurateTimeDiff = (function() {
 
  var diffnames = [&quot;decade&quot;,&quot;year&quot;,&quot;month&quot;,&quot;week&quot;,&quot;day&quot;,&quot;hour&quot;,&quot;minute&quot;,&quot;second&quot;],
      diffs = [
        function(d){ return d.setFullYear(d.getFullYear()+10);},
        function(d){ return d.setFullYear(d.getFullYear()+1);},
        function(d){ return d.setMonth(d.getMonth()+1);},
        function(d){ return d.setDate(d.getDate()+7);},
        function(d){ return d.setDate(d.getDate()+1);},
        function(d){ return d.setHours(d.getHours()+1);},
        function(d){ return d.setSeconds(d.getSeconds()+60);},
        function(d){ return d.setSeconds(d.getSeconds()+1);}
      ];
 
  return function (aTime, bTime, diff) {
    aTime = new Date(aTime);
    bTime = bTime === undefined ? new Date() : new Date(bTime);
    diff = diff &#124;&#124; 0;
    var amount = 0, iTime = aTime;
    while(bTime&gt;=diffs[diff](new Date(iTime))){
      iTime = diffs[diff](new Date(iTime));
      amount++;
    }
    return (amount ? amount + &quot; &quot; + diffnames[diff] + (amount&gt;1?&quot;s&quot;:&quot;&quot;) + 
             (+bTime - +iTime &gt; 1000 ? &quot;, &quot; : &quot;&quot;) : &quot;&quot;) + 
           (diff+1&lt;diffs.length ? arguments.callee(iTime,bTime,diff+1): &quot;&quot;);
    };

})();
&lt;/pre&gt;

Note: couldn&#039;t figure out how to prevent munging of lesser-than and greater -than characters.</description>
		<content:encoded><![CDATA[<p>@James</p>
<p>We can use the date objects&#8217; get/set methods to avoid having to define year and month in seconds. That way, we get pretty and accurate!</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span class="kw2">var</span> prettyAccurateTimeDiff <span class="sy0">=</span> <span class="br0">&#40;</span><span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
&nbsp;
  <span class="kw2">var</span> diffnames <span class="sy0">=</span> <span class="br0">&#91;</span><span class="st0">&quot;decade&quot;</span><span class="sy0">,</span><span class="st0">&quot;year&quot;</span><span class="sy0">,</span><span class="st0">&quot;month&quot;</span><span class="sy0">,</span><span class="st0">&quot;week&quot;</span><span class="sy0">,</span><span class="st0">&quot;day&quot;</span><span class="sy0">,</span><span class="st0">&quot;hour&quot;</span><span class="sy0">,</span><span class="st0">&quot;minute&quot;</span><span class="sy0">,</span><span class="st0">&quot;second&quot;</span><span class="br0">&#93;</span><span class="sy0">,</span>
      diffs <span class="sy0">=</span> <span class="br0">&#91;</span>
        <span class="kw2">function</span><span class="br0">&#40;</span>d<span class="br0">&#41;</span><span class="br0">&#123;</span> <span class="kw1">return</span> d.<span class="me1">setFullYear</span><span class="br0">&#40;</span>d.<span class="me1">getFullYear</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">+</span><span class="nu0">10</span><span class="br0">&#41;</span><span class="sy0">;</span><span class="br0">&#125;</span><span class="sy0">,</span>
        <span class="kw2">function</span><span class="br0">&#40;</span>d<span class="br0">&#41;</span><span class="br0">&#123;</span> <span class="kw1">return</span> d.<span class="me1">setFullYear</span><span class="br0">&#40;</span>d.<span class="me1">getFullYear</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">+</span><span class="nu0">1</span><span class="br0">&#41;</span><span class="sy0">;</span><span class="br0">&#125;</span><span class="sy0">,</span>
        <span class="kw2">function</span><span class="br0">&#40;</span>d<span class="br0">&#41;</span><span class="br0">&#123;</span> <span class="kw1">return</span> d.<span class="me1">setMonth</span><span class="br0">&#40;</span>d.<span class="me1">getMonth</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">+</span><span class="nu0">1</span><span class="br0">&#41;</span><span class="sy0">;</span><span class="br0">&#125;</span><span class="sy0">,</span>
        <span class="kw2">function</span><span class="br0">&#40;</span>d<span class="br0">&#41;</span><span class="br0">&#123;</span> <span class="kw1">return</span> d.<span class="me1">setDate</span><span class="br0">&#40;</span>d.<span class="me1">getDate</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">+</span><span class="nu0">7</span><span class="br0">&#41;</span><span class="sy0">;</span><span class="br0">&#125;</span><span class="sy0">,</span>
        <span class="kw2">function</span><span class="br0">&#40;</span>d<span class="br0">&#41;</span><span class="br0">&#123;</span> <span class="kw1">return</span> d.<span class="me1">setDate</span><span class="br0">&#40;</span>d.<span class="me1">getDate</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">+</span><span class="nu0">1</span><span class="br0">&#41;</span><span class="sy0">;</span><span class="br0">&#125;</span><span class="sy0">,</span>
        <span class="kw2">function</span><span class="br0">&#40;</span>d<span class="br0">&#41;</span><span class="br0">&#123;</span> <span class="kw1">return</span> d.<span class="me1">setHours</span><span class="br0">&#40;</span>d.<span class="me1">getHours</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">+</span><span class="nu0">1</span><span class="br0">&#41;</span><span class="sy0">;</span><span class="br0">&#125;</span><span class="sy0">,</span>
        <span class="kw2">function</span><span class="br0">&#40;</span>d<span class="br0">&#41;</span><span class="br0">&#123;</span> <span class="kw1">return</span> d.<span class="me1">setSeconds</span><span class="br0">&#40;</span>d.<span class="me1">getSeconds</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">+</span><span class="nu0">60</span><span class="br0">&#41;</span><span class="sy0">;</span><span class="br0">&#125;</span><span class="sy0">,</span>
        <span class="kw2">function</span><span class="br0">&#40;</span>d<span class="br0">&#41;</span><span class="br0">&#123;</span> <span class="kw1">return</span> d.<span class="me1">setSeconds</span><span class="br0">&#40;</span>d.<span class="me1">getSeconds</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">+</span><span class="nu0">1</span><span class="br0">&#41;</span><span class="sy0">;</span><span class="br0">&#125;</span>
      <span class="br0">&#93;</span><span class="sy0">;</span>
&nbsp;
  <span class="kw1">return</span> <span class="kw2">function</span> <span class="br0">&#40;</span>aTime<span class="sy0">,</span> bTime<span class="sy0">,</span> diff<span class="br0">&#41;</span> <span class="br0">&#123;</span>
    aTime <span class="sy0">=</span> <span class="kw2">new</span> Date<span class="br0">&#40;</span>aTime<span class="br0">&#41;</span><span class="sy0">;</span>
    bTime <span class="sy0">=</span> bTime <span class="sy0">===</span> undefined <span class="sy0">?</span> <span class="kw2">new</span> Date<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="sy0">:</span> <span class="kw2">new</span> Date<span class="br0">&#40;</span>bTime<span class="br0">&#41;</span><span class="sy0">;</span>
    diff <span class="sy0">=</span> diff <span class="sy0">||</span> <span class="nu0">0</span><span class="sy0">;</span>
    <span class="kw2">var</span> amount <span class="sy0">=</span> <span class="nu0">0</span><span class="sy0">,</span> iTime <span class="sy0">=</span> aTime<span class="sy0">;</span>
    <span class="kw1">while</span><span class="br0">&#40;</span>bTime<span class="sy0">&gt;=</span>diffs<span class="br0">&#91;</span>diff<span class="br0">&#93;</span><span class="br0">&#40;</span><span class="kw2">new</span> Date<span class="br0">&#40;</span>iTime<span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#123;</span>
      iTime <span class="sy0">=</span> diffs<span class="br0">&#91;</span>diff<span class="br0">&#93;</span><span class="br0">&#40;</span><span class="kw2">new</span> Date<span class="br0">&#40;</span>iTime<span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span>
      amount<span class="sy0">++;</span>
    <span class="br0">&#125;</span>
    <span class="kw1">return</span> <span class="br0">&#40;</span>amount <span class="sy0">?</span> amount <span class="sy0">+</span> <span class="st0">&quot; &quot;</span> <span class="sy0">+</span> diffnames<span class="br0">&#91;</span>diff<span class="br0">&#93;</span> <span class="sy0">+</span> <span class="br0">&#40;</span>amount<span class="sy0">&gt;</span><span class="nu0">1</span><span class="sy0">?</span><span class="st0">&quot;s&quot;</span><span class="sy0">:</span><span class="st0">&quot;&quot;</span><span class="br0">&#41;</span> <span class="sy0">+</span> 
             <span class="br0">&#40;</span><span class="sy0">+</span>bTime <span class="sy0">-</span> <span class="sy0">+</span>iTime <span class="sy0">&gt;</span> <span class="nu0">1000</span> <span class="sy0">?</span> <span class="st0">&quot;, &quot;</span> <span class="sy0">:</span> <span class="st0">&quot;&quot;</span><span class="br0">&#41;</span> <span class="sy0">:</span> <span class="st0">&quot;&quot;</span><span class="br0">&#41;</span> <span class="sy0">+</span> 
           <span class="br0">&#40;</span>diff<span class="sy0">+</span><span class="nu0">1</span><span class="sy0">&lt;</span>diffs.<span class="me1">length</span> <span class="sy0">?</span> arguments.<span class="me1">callee</span><span class="br0">&#40;</span>iTime<span class="sy0">,</span>bTime<span class="sy0">,</span>diff<span class="sy0">+</span><span class="nu0">1</span><span class="br0">&#41;</span><span class="sy0">:</span> <span class="st0">&quot;&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span>
    <span class="br0">&#125;</span><span class="sy0">;</span>
&nbsp;
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></pre></div></div>

<p>Note: couldn&#8217;t figure out how to prevent munging of lesser-than and greater -than characters.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Nadel</title>
		<link>http://james.padolsey.com/javascript/recursive-pretty-date/comment-page-1/#comment-16781</link>
		<dc:creator>Ben Nadel</dc:creator>
		<pubDate>Mon, 20 Jul 2009 11:59:31 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=1022#comment-16781</guid>
		<description>@Ricky,

I also saw that this was something deprecated. I don&#039;t know why; I don&#039;t think there is any other way to do this without knowing the name of the function, which, when anonymous, is not possible. I would think it is not something that will ever actually be removed from language support.</description>
		<content:encoded><![CDATA[<p>@Ricky,</p>
<p>I also saw that this was something deprecated. I don&#8217;t know why; I don&#8217;t think there is any other way to do this without knowing the name of the function, which, when anonymous, is not possible. I would think it is not something that will ever actually be removed from language support.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ricky</title>
		<link>http://james.padolsey.com/javascript/recursive-pretty-date/comment-page-1/#comment-16762</link>
		<dc:creator>Ricky</dc:creator>
		<pubDate>Mon, 20 Jul 2009 02:36:20 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=1022#comment-16762</guid>
		<description>Hi James, I wonder, does the arguments.callee( +new Date() - remainder*1000 ); is the recursive part in your code?
I tried to google for arguments.callee, but some references I found tells that this property has been deprecated.
Do you plan to implement another recursive way to replace it?
Thanks</description>
		<content:encoded><![CDATA[<p>Hi James, I wonder, does the arguments.callee( +new Date() &#8211; remainder*1000 ); is the recursive part in your code?<br />
I tried to google for arguments.callee, but some references I found tells that this property has been deprecated.<br />
Do you plan to implement another recursive way to replace it?<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Valentino</title>
		<link>http://james.padolsey.com/javascript/recursive-pretty-date/comment-page-1/#comment-16738</link>
		<dc:creator>Valentino</dc:creator>
		<pubDate>Sun, 19 Jul 2009 16:49:28 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=1022#comment-16738</guid>
		<description>nice! I didn&#039;t even know existed a &quot;unary plus operator&quot;! :D</description>
		<content:encoded><![CDATA[<p>nice! I didn&#8217;t even know existed a &#8220;unary plus operator&#8221;! <img src='http://james.padolsey.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://james.padolsey.com/javascript/recursive-pretty-date/comment-page-1/#comment-16736</link>
		<dc:creator>James</dc:creator>
		<pubDate>Sun, 19 Jul 2009 16:33:08 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=1022#comment-16736</guid>
		<description>@josh, Unfortunately, the order of JavaScript hashes cannot be relied upon; you&#039;ll get different results across different implementations. Another technique I considered was to have two arrays; one containing the time units (&quot;second&quot;, &quot;minute&quot; etc.) and the other containing their respective values (1,60,3600 etc.)...</description>
		<content:encoded><![CDATA[<p>@josh, Unfortunately, the order of JavaScript hashes cannot be relied upon; you&#8217;ll get different results across different implementations. Another technique I considered was to have two arrays; one containing the time units (&#8220;second&#8221;, &#8220;minute&#8221; etc.) and the other containing their respective values (1,60,3600 etc.)&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pascal</title>
		<link>http://james.padolsey.com/javascript/recursive-pretty-date/comment-page-1/#comment-16735</link>
		<dc:creator>Pascal</dc:creator>
		<pubDate>Sun, 19 Jul 2009 16:31:45 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=1022#comment-16735</guid>
		<description>Brilliant timing [sic]: I was just looking for a way to showcase a count down to my baby&#039;s birthday on his site ––never too early to manage fans ; )

Also my excuse to leave a comment and say how much I&#039;ve been enjoying/learning from your site, James.

Cheers,</description>
		<content:encoded><![CDATA[<p>Brilliant timing [sic]: I was just looking for a way to showcase a count down to my baby&#8217;s birthday on his site ––never too early to manage fans ; )</p>
<p>Also my excuse to leave a comment and say how much I&#8217;ve been enjoying/learning from your site, James.</p>
<p>Cheers,</p>
]]></content:encoded>
	</item>
</channel>
</rss>

