New to Kendo UI for jQueryStart a free 30-day trial

WeekInYear

methods

Returns week number of a specific date. According to the ISO-8601 standard, weeks starting on Monday. The first week of the year is the week that contains that year's first Thursday (='First 4-day week'). The method allows defining diffent start day by using the second parameter.

Parameters:dateDate

The given date.

Returns:Number

A number resenting the week number of a given date.

<script>
    //no weekStart is passed so Monday will be considered as starting point for week

/* The result can be observed in the DevTools(F12) console of the browser. */
    console.log(kendo.date.weekInYear(new Date(2017, 0, 9))); // 2
    //Sunday is passed as week start

/* The result can be observed in the DevTools(F12) console of the browser. */
    console.log(kendo.date.weekInYear(new Date(2017, 0, 9), new Date(2017, 0, 8))); // 3
</script>
Not finding the help you need?
Contact Support