PP.Date.getWeekOfYear(date): Number;
date. Date. Date.
The getWeekOfYear static method returns the week number of the specified date.
Returns the week number starting from one.
To execute the example, add a link to PP.js scenario file to HTML page.
// Create the current date date = new Date(); // Determine week number week = PP.Date.getWeekOfYear(date); console.log(week);
After executing the example the current week number is obtained.
See also: