isThisWeek
Modified on Tue, 22 Aug 2023
Description
Use this function to check if a given date falls within the same week as the current date. It returns true if the given date is in the same week as the current date, and false otherwise.
Syntax
isThisWeek(date, options)
Returns
Return Value | Description |
---|---|
True/False | Returns true if the given date is in the same week as the current date, otherwise false. |
Sample
Example | Result | Description |
---|---|---|
isThisWeek(2023-08-10) | true | August 10th, 2023, falls within the same week as the current date, so the function returns true. |
isThisWeek(2023-09-15) | false | September 15th, 2023, does not fall within the same week as the current date, so the function returns false. |
To view all the Date functions, click here.
See Also
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article