How to turn php time function into javascript function?
<p>I'm not that good at javascript (yet), so I need some help, with an alternative version of this php script (In javascript)</p>

<pre><code>function until($format = ""){
    $now = strtotime("now");
    $nextTuesday = strtotime("-1 hour next tuesday");
    $until = $nextTuesday - $now;
    if(empty($format)){
        return $until;
    }else{
        return date("$format",$until);
    }
}
</code></pre>

<p>Just need it to count down, until next tuesday, in a really short way (Not in 20+ lines, like all the other script I've seen)
It should still return a timestamp, if it's possible (Need it for an offline app)</p>

<p>So if anyone could help me, I would be really happy (Not that I'm not happy right now, but I would be even happier) :D</p>
