Date.getWeekOfYear

Syntax

PP.Date.getWeekOfYear(date): Number;

Parameters

date. Date. Date.

Description

The getWeekOfYear static method returns the week number of the specified date.

Comments

Returns the week number starting from one.

Example

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:

PP