From 47ae062b5fff132a1973942f8707387d727efd03 Mon Sep 17 00:00:00 2001 From: tbor00 Date: Sun, 23 Apr 2023 15:46:42 -0300 Subject: [PATCH 1/2] add function to compare dates and readme --- index.js | 6 +++++- readme.md | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 readme.md diff --git a/index.js b/index.js index db3b8f7..2f25db3 100644 --- a/index.js +++ b/index.js @@ -2,6 +2,10 @@ function compareDates(date1, date2) { return date1.getTime() === date2.getTime(); } +function compareDaysBetweenDates(date1, date2) { + return Math.floor((date1.getTime() - date2.getTime()) / (1000 * 3600 * 24)); +} + function createTextWithVoice(text, voice) { const utterance = new SpeechSynthesisUtterance(text); utterance.voice = voice; @@ -24,4 +28,4 @@ function createStore() { }; } -export { compareDates, createTextWithVoice, createStore } \ No newline at end of file +export { compareDates, createTextWithVoice, createStore, compareDaysBetweenDates } \ No newline at end of file diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..75941ab --- /dev/null +++ b/readme.md @@ -0,0 +1 @@ +This is an example repository to test actions \ No newline at end of file From 3b77dadd2c9b05dd28157bc295ac472661fa6293 Mon Sep 17 00:00:00 2001 From: tbor00 Date: Sun, 23 Apr 2023 15:48:02 -0300 Subject: [PATCH 2/2] ci: remove install deps --- .github/workflows/code_review.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/code_review.yml b/.github/workflows/code_review.yml index feba9a4..dcae440 100644 --- a/.github/workflows/code_review.yml +++ b/.github/workflows/code_review.yml @@ -8,13 +8,6 @@ jobs: review: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: '16' - cache: npm - - run: npm install - - name: 360 Code Review uses: dd3tech/360-code-review@1.0.0