Check documentation for the latest version of dhtmlxSuite getWeekNumber DHTMLX Docs

getWeekNumber

returns the week number of the specified date

number getWeekNumber(Date|string date);
dateDate|stringthe date you want to get the week number of
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