azure
Version:
Microsoft Azure Client Library for node
4,658 lines (1,335 loc) • 95.9 kB
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Date-Utils Class: Date</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
<link type="text/css" rel="stylesheet" href="styles/site.journal.css">
</head>
<body>
<div class="container-fluid">
<div class="navbar navbar-fixed-top navbar-inverse">
<div class="navbar-inner">
<a class="brand" href="index.html">Date-Utils</a>
<ul class="nav">
<li class="dropdown">
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
class="caret"></b></a>
<ul class="dropdown-menu ">
<li>
<a href="Date.html">Date</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="row-fluid">
<div class="span8">
<div id="main">
<h1 class="page-title">Class: Date</h1>
<section>
<header>
<h2>
Date
</h2>
</header>
<article>
<div class="container-overview">
<dt>
<h4 class="name" id="Date"><span class="type-signature"></span>new Date<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
</dl>
</dd>
</div>
<h3 class="subsection-title">Methods</h3>
<dl>
<dt>
<h4 class="name" id="compare"><span class="type-signature"><static> </span>compare<span class="signature">(date1, date2)</span><span class="type-signature"> → {Number}</span></h4>
</dt>
<dd>
<div class="description">
<p>Compares two dates</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>date1</code></td>
<td class="type">
<span class="param-type"><a href="Date.html">Date</a></span>
</td>
<td class="description last"><p>first date</p></td>
</tr>
<tr>
<td class="name"><code>date2</code></td>
<td class="type">
<span class="param-type"><a href="Date.html">Date</a></span>
</td>
<td class="description last"><p>second date</p></td>
</tr>
</tbody>
</table>
<dl class="details">
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>-1 if date1 is less than date2, 0 if they are equal, 1 if date1 is more than date2</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Number</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="equals"><span class="type-signature"><static> </span>equals<span class="signature">(date1, date2)</span><span class="type-signature"> → {Boolean}</span></h4>
</dt>
<dd>
<div class="description">
<p>Compares two dates to the millisecond</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>date1</code></td>
<td class="type">
<span class="param-type"><a href="Date.html">Date</a></span>
</td>
<td class="description last"><p>first date</p></td>
</tr>
<tr>
<td class="name"><code>date2</code></td>
<td class="type">
<span class="param-type"><a href="Date.html">Date</a></span>
</td>
<td class="description last"><p>second date</p></td>
</tr>
</tbody>
</table>
<dl class="details">
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Boolean</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="equalsDay"><span class="type-signature"><static> </span>equalsDay<span class="signature">(date1, date2)</span><span class="type-signature"> → {Boolean}</span></h4>
</dt>
<dd>
<div class="description">
<p>Compares two dates by day</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>date1</code></td>
<td class="type">
<span class="param-type"><a href="Date.html">Date</a></span>
</td>
<td class="description last"><p>first date</p></td>
</tr>
<tr>
<td class="name"><code>date2</code></td>
<td class="type">
<span class="param-type"><a href="Date.html">Date</a></span>
</td>
<td class="description last"><p>second date</p></td>
</tr>
</tbody>
</table>
<dl class="details">
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Boolean</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getDayNumberFromName"><span class="type-signature"><static> </span>getDayNumberFromName<span class="signature">(day)</span><span class="type-signature"> → {Number}</span></h4>
</dt>
<dd>
<div class="description">
<p>Returns the day number for a day [0-6]</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>day</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>day name</p></td>
</tr>
</tbody>
</table>
<dl class="details">
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Number</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getDaysInMonth"><span class="type-signature"><static> </span>getDaysInMonth<span class="signature">(year, month)</span><span class="type-signature"> → {Number}</span></h4>
</dt>
<dd>
<div class="description">
<p>Returns the number of days in a month</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>year</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>year</p></td>
</tr>
<tr>
<td class="name"><code>month</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>month</p></td>
</tr>
</tbody>
</table>
<dl class="details">
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Number</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getMonthAbbrFromNumber"><span class="type-signature"><static> </span>getMonthAbbrFromNumber<span class="signature">(month)</span><span class="type-signature"> → {String}</span></h4>
</dt>
<dd>
<div class="description">
<p>Returns the month name abbreviated for a month [0-11]</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>month</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>month</p></td>
</tr>
</tbody>
</table>
<dl class="details">
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">String</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getMonthNameFromNumber"><span class="type-signature"><static> </span>getMonthNameFromNumber<span class="signature">(month)</span><span class="type-signature"> → {String}</span></h4>
</dt>
<dd>
<div class="description">
<p>Returns the month name for a month [0-11]</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>month</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>month</p></td>
</tr>
</tbody>
</table>
<dl class="details">
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">String</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getMonthNumberFromName"><span class="type-signature"><static> </span>getMonthNumberFromName<span class="signature">(month)</span><span class="type-signature"> → {Number}</span></h4>
</dt>
<dd>
<div class="description">
<p>Returns the day number for a month [0-11]</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>month</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last"><p>month name</p></td>
</tr>
</tbody>
</table>
<dl class="details">
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Number</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="isLeapYear"><span class="type-signature"><static> </span>isLeapYear<span class="signature">(year)</span><span class="type-signature"> → {Boolean}</span></h4>
</dt>
<dd>
<div class="description">
<p>Returns whether or not the year is a leap year</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>year</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>year</p></td>
</tr>
</tbody>
</table>
<dl class="details">
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Boolean</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="today"><span class="type-signature"><static> </span>today<span class="signature">()</span><span class="type-signature"> → {<a href="Date.html">Date</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Returns new instance of Date object with the date set to today and
the time set to midnight</p>
</div>
<dl class="details">
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>Today's Date</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Date.html">Date</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="tomorrow"><span class="type-signature"><static> </span>tomorrow<span class="signature">()</span><span class="type-signature"> → {<a href="Date.html">Date</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Returns new instance of Date object with the date set to tomorrow and
the time set to midnight</p>
</div>
<dl class="details">
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>Tomorrow's Date</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Date.html">Date</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="UTCtoday"><span class="type-signature"><static> </span>UTCtoday<span class="signature">()</span><span class="type-signature"> → {<a href="Date.html">Date</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Returns new instance of Date object with the date set to today and
the time set to midnight in UTC</p>
</div>
<dl class="details">
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>Today's Date in UTC</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Date.html">Date</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="UTCtomorrow"><span class="type-signature"><static> </span>UTCtomorrow<span class="signature">()</span><span class="type-signature"> → {<a href="Date.html">Date</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Returns new instance of Date object with the date set to tomorrow and
the time set to midnight in UTC</p>
</div>
<dl class="details">
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>Tomorrow's Date in UTC</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Date.html">Date</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="UTCyesterday"><span class="type-signature"><static> </span>UTCyesterday<span class="signature">()</span><span class="type-signature"> → {<a href="Date.html">Date</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Returns new instance of Date object with the date set to yesterday and
the time set to midnight in UTC</p>
</div>
<dl class="details">
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>Yesterday's Date in UTC</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Date.html">Date</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="validateDay"><span class="type-signature"><static> </span>validateDay<span class="signature">(day, year, month)</span><span class="type-signature"> → {Boolean}</span></h4>
</dt>
<dd>
<div class="description">
<p>Returns whether the day is valid</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>day</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>day of the month</p></td>
</tr>
<tr>
<td class="name"><code>year</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>year</p></td>
</tr>
<tr>
<td class="name"><code>month</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>month of the year [0-11]</p></td>
</tr>
</tbody>
</table>
<dl class="details">
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Boolean</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="validateHour"><span class="type-signature"><static> </span>validateHour<span class="signature">(hour)</span><span class="type-signature"> → {Boolean}</span></h4>
</dt>
<dd>
<div class="description">
<p>Returns whether the hour is valid [0-23]</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>hour</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>hour</p></td>
</tr>
</tbody>
</table>
<dl class="details">
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Boolean</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="validateMillisecond"><span class="type-signature"><static> </span>validateMillisecond<span class="signature">(millisecond)</span><span class="type-signature"> → {Boolean}</span></h4>
</dt>
<dd>
<div class="description">
<p>Returns whether the millisecond is valid</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>millisecond</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>millisecond</p></td>
</tr>
</tbody>
</table>
<dl class="details">
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Boolean</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="validateMinute"><span class="type-signature"><static> </span>validateMinute<span class="signature">(minute)</span><span class="type-signature"> → {Boolean}</span></h4>
</dt>
<dd>
<div class="description">
<p>Returns whether the minute is valid</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>minute</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>minute</p></td>
</tr>
</tbody>
</table>
<dl class="details">
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Boolean</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="validateMonth"><span class="type-signature"><static> </span>validateMonth<span class="signature">(month)</span><span class="type-signature"> → {Boolean}</span></h4>
</dt>
<dd>
<div class="description">
<p>Returns whether the month is valid [0-11]</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>month</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>month</p></td>
</tr>
</tbody>
</table>
<dl class="details">
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Boolean</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="validateSecond"><span class="type-signature"><static> </span>validateSecond<span class="signature">(second)</span><span class="type-signature"> → {Boolean}</span></h4>
</dt>
<dd>
<div class="description">
<p>Returns whether the second is valid</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>second</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>second</p></td>
</tr>
</tbody>
</table>
<dl class="details">
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Boolean</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="validateYear"><span class="type-signature"><static> </span>validateYear<span class="signature">(year)</span><span class="type-signature"> → {Boolean}</span></h4>
</dt>
<dd>
<div class="description">
<p>Returns whether the year is valid</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>year</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>year</p></td>
</tr>
</tbody>
</table>
<dl class="details">
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Boolean</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="yesterday"><span class="type-signature"><static> </span>yesterday<span class="signature">()</span><span class="type-signature"> → {<a href="Date.html">Date</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Returns new instance of Date object with the date set to yesterday and
the time set to midnight</p>
</div>
<dl class="details">
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>Yesterday's Date</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Date.html">Date</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="add"><span class="type-signature"></span>add<span class="signature">(additions)</span><span class="type-signature"> → {<a href="Date.html">Date</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Adds <code>milliseconds</code>, <code>seconds</code>, <code>minutes</code>, <code>hours</code>, <code>days</code>, <code>weeks</code>, <code>months</code>, and <code>years</code> and returns a new Date.
Usage: <code>data.add({ "seconds": 10, "days": 1 })</code></p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>additions</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Date.html">Date</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="addHours"><span class="type-signature"></span>addHours<span class="signature">(hours)</span><span class="type-signature"> → {<a href="Date.html">Date</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Adds hours to the Date and returns it</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>hours</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>Number of hours to add</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="important tag-deprecated">Deprecated:</dt>
<dd>
<ul class="dummy">
<li>Will be deprecated in version 2.0 in favor of add</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Date.html">Date</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="addMilliseconds"><span class="type-signature"></span>addMilliseconds<span class="signature">(milliseconds)</span><span class="type-signature"> → {<a href="Date.html">Date</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Adds milliseconds to the Date and returns it</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>milliseconds</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>Number of milliseconds to add</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="important tag-deprecated">Deprecated:</dt>
<dd>
<ul class="dummy">
<li>Will be deprecated in version 2.0 in favor of add</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Date.html">Date</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="addMinutes"><span class="type-signature"></span>addMinutes<span class="signature">(minutes)</span><span class="type-signature"> → {<a href="Date.html">Date</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Adds minutes to the Date and returns it</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>minutes</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>Number of minutes to add</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="important tag-deprecated">Deprecated:</dt>
<dd>
<ul class="dummy">
<li>Will be deprecated in version 2.0 in favor of add</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Date.html">Date</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="addMonths"><span class="type-signature"></span>addMonths<span class="signature">(months)</span><span class="type-signature"> → {<a href="Date.html">Date</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Adds months to the Date and returns it</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>months</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>Number of months to add</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="important tag-deprecated">Deprecated:</dt>
<dd>
<ul class="dummy">
<li>Will be deprecated in version 2.0 in favor of add</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Date.html">Date</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="addSeconds"><span class="type-signature"></span>addSeconds<span class="signature">(seconds)</span><span class="type-signature"> → {<a href="Date.html">Date</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Adds seconds to the Date and returns it</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>seconds</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>Number of seconds to add</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="important tag-deprecated">Deprecated:</dt>
<dd>
<ul class="dummy">
<li>Will be deprecated in version 2.0 in favor of add</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Date.html">Date</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="addSeconds"><span class="type-signature"></span>addSeconds<span class="signature">(days)</span><span class="type-signature"> → {<a href="Date.html">Date</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Adds days to the Date and returns it</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>days</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>Number of days to add</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="important tag-deprecated">Deprecated:</dt>
<dd>
<ul class="dummy">
<li>Will be deprecated in version 2.0 in favor of add</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Date.html">Date</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="addWeekdays"><span class="type-signature"></span>addWeekdays<span class="signature">(weekdays)</span><span class="type-signature"> → {<a href="Date.html">Date</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Adds weekdays based on a Mon-Fri work schedule and returns it</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>weekdays</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>Number of weekdays to add</p></td>
</tr>
</tbody>
</table>
<dl class="details">
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Date.html">Date</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="addWeeks"><span class="type-signature"></span>addWeeks<span class="signature">(weeks)</span><span class="type-signature"> → {<a href="Date.html">Date</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Adds weeks to the Date and returns it</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>weeks</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>Number of weeks to add</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="important tag-deprecated">Deprecated:</dt>
<dd>
<ul class="dummy">
<li>Will be deprecated in version 2.0 in favor of add</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Date.html">Date</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="addYears"><span class="type-signature"></span>addYears<span class="signature">(years)</span><span class="type-signature"> → {<a href="Date.html">Date</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Adds years to the Date and returns it</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>years</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last"><p>Number of years to add</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="important tag-deprecated">Deprecated:</dt>
<dd>
<ul class="dummy">
<li>Will be deprecated in version 2.0 in favor of add</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Date.html">Date</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="between"><span class="type-signature"></span>between<span class="signature">()</span><span class="type-signature"> → {Boolean}</span></h4>
</dt>
<dd>
<div class="description">
<p>Returns whether this Date is between a start and end date</p>
</div>
<dl class="details">
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Boolean</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="clearTime"><span class="type-signature"></span>clearTime<span class="signature">()</span><span class="type-signature"> → {<a href="Date.html">Date</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Sets the time to 00:00:00.0000 and returns a new Date object</p>
</div>
<dl class="details">
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Date.html">Date</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="clearUTCTime"><span class="type-signature"></span>clearUTCTime<span class="signature">()</span><span class="type-signature"> → {<a href="Date.html">Date</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Sets the time to 00:00:00.0000 and returns a new Date object with set to UTC</p>
</div>
<dl class="details">
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Date.html">Date</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="clone"><span class="type-signature"></span>clone<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Returns a cloned copy of the current Date</p>
</div>