Skip to content
This repository has been archived by the owner on Jul 31, 2020. It is now read-only.

Check if date is between two days of this week returns an error. #136

Open
AtanasBobev opened this issue Aug 27, 2019 · 0 comments
Open

Comments

@AtanasBobev
Copy link

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?

image

Here is my code: Date.parse(localStorage.getItem('daysSet')).between(Date.parse("Monday") , Date.parse("Sunday"))

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant