snipt

Ctrl+h for KB shortcuts

JavaScript

Untitled

1
2
3
.on{
 keyup = false   
}
https://snipt.net/embed/7214e558bd6cf14a2f1ffa4f333feae7/
https://snipt.net/raw/7214e558bd6cf14a2f1ffa4f333feae7/
7214e558bd6cf14a2f1ffa4f333feae7
js
JavaScript
3
2016-09-16T17:50:06
True
False
True
Mar 13, 2015 at 03:16 PM
/api/public/snipt/138549/
-9d51c10f
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="p">.</span><span class="nx">on</span><span class="p">{</span> </span><span id="L-2"><a name="L-2"></a> <span class="nx">keyup</span> <span class="o">=</span> <span class="kc">false</span> </span><span id="L-3"><a name="L-3"></a><span class="p">}</span> </span></pre></div> </td></tr></table>
JS

JavaScript

JS Date formatter

1
2
3
4
5
6
7
/*
 * Función formateadora de fechas.
 */
function dateFormatter(dateAsLong) {
	var date = new Date(dateAsLong);
	return date.getDate() + "/" + (date.getMonth() + 1) + "/" + date.getFullYear() + " " + date.getHours() + ":" + date.getMinutes();
}
https://snipt.net/embed/878440b0b9c96f05a6fad01f29bf24cf/
https://snipt.net/raw/878440b0b9c96f05a6fad01f29bf24cf/
878440b0b9c96f05a6fad01f29bf24cf
js
JavaScript
7
2016-09-22T01:00:08
True
False
False
May 05, 2014 at 05:38 AM
/api/public/snipt/134736/
js-date-formatter-9e1198a7
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="cm">/*</span> </span><span id="L-2"><a name="L-2"></a><span class="cm"> * Función formateadora de fechas.</span> </span><span id="L-3"><a name="L-3"></a><span class="cm"> */</span> </span><span id="L-4"><a name="L-4"></a><span class="kd">function</span> <span class="nx">dateFormatter</span><span class="p">(</span><span class="nx">dateAsLong</span><span class="p">)</span> <span class="p">{</span> </span><span id="L-5"><a name="L-5"></a> <span class="kd">var</span> <span class="nx">date</span> <span class="o">=</span> <span class="k">new</span> <span class="nb">Date</span><span class="p">(</span><span class="nx">dateAsLong</span><span class="p">);</span> </span><span id="L-6"><a name="L-6"></a> <span class="k">return</span> <span class="nx">date</span><span class="p">.</span><span class="nx">getDate</span><span class="p">()</span> <span class="o">+</span> <span class="s2">&quot;/&quot;</span> <span class="o">+</span> <span class="p">(</span><span class="nx">date</span><span class="p">.</span><span class="nx">getMonth</span><span class="p">()</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;/&quot;</span> <span class="o">+</span> <span class="nx">date</span><span class="p">.</span><span class="nx">getFullYear</span><span class="p">()</span> <span class="o">+</span> <span class="s2">&quot; &quot;</span> <span class="o">+</span> <span class="nx">date</span><span class="p">.</span><span class="nx">getHours</span><span class="p">()</span> <span class="o">+</span> <span class="s2">&quot;:&quot;</span> <span class="o">+</span> <span class="nx">date</span><span class="p">.</span><span class="nx">getMinutes</span><span class="p">();</span> </span><span id="L-7"><a name="L-7"></a><span class="p">}</span> </span></pre></div> </td></tr></table>
Date, JS, format
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.