From 703b3754a4c159f0c767bcdea43628ad489c1a12 Mon Sep 17 00:00:00 2001 From: Saeid Date: Mon, 20 Jul 2020 20:15:34 +0430 Subject: [PATCH] feat: add minute in date --- .idea/vcs.xml | 7 +++++++ resources/js/Global/utils/date/date.js | 7 +++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 7517431..41f31b8 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -2,6 +2,13 @@ + + + + + + + diff --git a/resources/js/Global/utils/date/date.js b/resources/js/Global/utils/date/date.js index 669a491..f1bf4fe 100644 --- a/resources/js/Global/utils/date/date.js +++ b/resources/js/Global/utils/date/date.js @@ -11,6 +11,9 @@ const formatToYMD = function (date = null, split = "-" ) { if (day.length < 2) day = `0${day}`; return [year, month, day].join(split); -} +}; +const addMinutes = function (date, minutes) { + return new Date(date.getTime() + minutes*60000); +}; -export {formatToYMD}; \ No newline at end of file +export {formatToYMD, addMinutes};