JavaScript
DategetWeekOfYear Method
Syntax
Date.getWeekOfYear()
Returns
- weeknumber
The week of the year.
Description
Extension to the native date variable to the get the week of the year a given date is in.
Example
var d = new Date(2018,7,10); var w = d.getWeekOfYear(); // w = 31