Hi. I'm new to date.js. I have a localStorage key that holds date. My goal is to check if this specific date is between this monday and this sunday of this week. For example: today is Tuesday. Checking today I should get true but after one week the response should be false because one week has passed. What I came up so far provokes errors in the console. How to make this code work as intended?
Here is my code: Date.parse(localStorage.getItem('daysSet')).between(Date.parse("Monday") , Date.parse("Sunday"))
Hi. I'm new to date.js. I have a localStorage key that holds date. My goal is to check if this specific date is between this monday and this sunday of this week. For example: today is Tuesday. Checking today I should get true but after one week the response should be false because one week has passed. What I came up so far provokes errors in the console. How to make this code work as intended?
Here is my code:
Date.parse(localStorage.getItem('daysSet')).between(Date.parse("Monday") , Date.parse("Sunday"))