Skip to content

Commit f96d8d8

Browse files
committed
Types: Add Date type
Fixes jquery/api.jqueryui.com#194 Closes gh-445
1 parent 7c87b42 commit f96d8d8

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

pages/Types.html

+13
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
</ul>
7474
</li>
7575
<li class="toclevel-1"><a href="#PlainObject"><span class="toctext">PlainObject</span></a></li>
76+
<li class="toclevel-1"><a href="#Date"><span class="toctext">Date</span></a></li>
7677
<li class="toclevel-1"><a href="#Function"><span class="toctext">Function</span></a>
7778
<ul>
7879
<li class="toclevel-2"><a href="#Arguments"><span class="toctext">Arguments</span></a></li>
@@ -421,6 +422,18 @@ <h2 id="PlainObject"> PlainObject </h2>
421422
jQuery.isPlainObject( o ); // true
422423
</code></pre>
423424

425+
<h2 id="Date"> Date </h2>
426+
<p>The Date type is a JavaScript object that represents a single moment in time. Date objects are instantiated using their constructor function, which by default creates an object that represents the current date and time.
427+
</p>
428+
<pre><code data-lang="javascript">
429+
new Date();
430+
</code></pre>
431+
<p>To create a Date object for an alternative date and time, pass numeric arguments in the following order: year, month, day, minute, second, millisecond - although note that the month is zero-based, whereas the other arguments are one-based. The following creates a Date object representing January 1st, 2014 at 8:15.
432+
</p>
433+
<pre><code data-lang="javascript">
434+
new Date( 2014, 0, 1, 8, 15 );
435+
</code></pre>
436+
424437
<h2 id="Function"> Function </h2>
425438
<p>A function in JavaScript can be either named or anonymous. Any function can be assigned to a variable or passed to a method, but passing member functions this way can cause them to be called in the context of another object (i.e. with a different "this" object).
426439
</p>

0 commit comments

Comments
 (0)