Travis build: 316

This commit is contained in:
Travis CI
2017-12-26 17:01:00 +00:00
parent 9f1a0f4345
commit 00d150cd7d
2 changed files with 20 additions and 0 deletions

View File

@ -81,6 +81,7 @@
* [`getDaysDiffBetweenDates`](#getdaysdiffbetweendates)
* [`JSONToDate`](#jsontodate)
* [`toEnglishDate`](#toenglishdate)
* [`tomorrow`](#tomorrow)
### Function
* [`chainAsync`](#chainasync)
@ -1152,6 +1153,18 @@ const toEnglishDate = (time) =>
// toEnglishDate('09/21/2010') -> '21/09/2010'
```
[⬆ back to top](#table-of-contents)
### tomorrow
Results in a string representation of tomorrow's date.
Use `new Date()` to get today's date, adding `86400000` of seconds to it(24 hours), using `toISOString` to convert Date object to string.
```js
const tomorrow = () => new Date(new Date() + 86400000).toISOString().split('T')[0];
// tomorrow() -> 2017-12-26
```
[⬆ back to top](#table-of-contents)
## Function

View File

@ -142,6 +142,7 @@
</h3><a class="sublink-1" href="#getdaysdiffbetweendates">getDaysDiffBetweenDates</a>
<a class="sublink-1" href="#jsontodate">JSONToDate</a>
<a class="sublink-1" href="#toenglishdate">toEnglishDate</a>
<a class="sublink-1" href="#tomorrow">tomorrow</a>
<h3>Function
</h3><a class="sublink-1" href="#chainasync">chainAsync</a>
@ -784,6 +785,12 @@ Throws an error if the passed time cannot be converted to a date.</p>
{try{return new Date(time).toISOString().split('T')[0].replace(/-/g, '/')}catch(e){return}};
// toEnglishDate('09/21/2010') -&gt; '21/09/2010'
</code></pre>
</div></div><br/><div class="card fluid"><div class="section double-padded"><h3 id="tomorrow">tomorrow</h3></div><div class="section double-padded">
<p>Results in a string representation of tomorrow's date.
Use <code>new Date()</code> to get today's date, adding <code>86400000</code> of seconds to it(24 hours), using <code>toISOString</code> to convert Date object to string.</p>
<pre><code class="language-js">const tomorrow = () =&gt; new Date(new Date() + 86400000).toISOString().split('T')[0];
// tomorrow() -&gt; 2017-12-26
</code></pre>
</div></div><br/><h2 style="text-align:center">Function</h2>
<div class="card fluid"><div class="section double-padded"><h3 id="chainasync">chainAsync</h3></div><div class="section double-padded">
<p>Chains asynchronous functions.</p>