differenceInWeeks
Modified on Tue, 22 Aug 2023
Description
Use this function to get the number of full weeks between two dates.
Syntax
differenceInWeeks(date1, date2, options)
Returns
Return Value | Description |
---|---|
Number | Return the number of full weeks between two dates. |
Sample
Example | Result | Description |
---|---|---|
differenceInWeeks (2023-1-1, 2023-4-3) | 13 | In this example, start_date is January 1, 2023, and the end_date is April 3, 2023. This function calculates the number of full weeks between these two dates (13 weeks). |
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