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 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