From c37362d4829e05bd8cc35b292b3ed38aa10eed47 Mon Sep 17 00:00:00 2001 From: 30secondsofcode <30secondsofcode@gmail.com> Date: Sat, 3 Nov 2018 14:16:34 +0000 Subject: [PATCH] Travis build: 731 --- README.md | 2 +- docs/date.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a55ecdd87..d274b39b6 100644 --- a/README.md +++ b/README.md @@ -4286,7 +4286,7 @@ formatDuration(34325055574); // '397 days, 6 hours, 44 minutes, 15 seconds, 574 Returns a string of the form `HH:MM:SS` from a `Date` object. -Use `Date.prototype.toString()` and `String.prototype.slice()` to get the `HH:MM:SS` part of a given `Date` object. +Use `Date.prototype.toTimeString()` and `String.prototype.slice()` to get the `HH:MM:SS` part of a given `Date` object. ```js const getColonTimeFromDate = date => date.toTimeString().slice(0, 8); diff --git a/docs/date.html b/docs/date.html index 419f74d0d..05057e39e 100644 --- a/docs/date.html +++ b/docs/date.html @@ -110,7 +110,7 @@ };
formatDuration(1001); // '1 second, 1 millisecond' formatDuration(34325055574); // '397 days, 6 hours, 44 minutes, 15 seconds, 574 milliseconds' -
Returns a string of the form HH:MM:SS from a Date object.
Use Date.prototype.toString() and String.prototype.slice() to get the HH:MM:SS part of a given Date object.
const getColonTimeFromDate = date => date.toTimeString().slice(0, 8); +
Returns a string of the form HH:MM:SS from a Date object.
Use Date.prototype.toTimeString() and String.prototype.slice() to get the HH:MM:SS part of a given Date object.
const getColonTimeFromDate = date => date.toTimeString().slice(0, 8);
getColonTimeFromDate(new Date()); // "08:38:00"
Returns the difference (in days) between two dates.
Calculate the difference (in days) between two Date objects.
const getDaysDiffBetweenDates = (dateInitial, dateFinal) => (dateFinal - dateInitial) / (1000 * 3600 * 24);