Check documentation for the latest version 6.0 of dhtmlxSuite getWeekNumber DHTMLX Docs

getWeekNumber

returns the week number of the specified date

number getWeekNumber(Date|string date);

Parameters

dateDate|stringthe date you want to get the week number of

Returns

numberweek number

Example

var w = myCalendar.getWeekNumber(new Date(2013, 0, 1)); // w => 1
 
// or
myCalendar.setDateFormat("%Y-%m-%d");
var w = myCalendar.getWeekNumber("2013-01-11"); // t => 2

Back to top