New to Kendo UI for Angular? Start a free 30-day trial
weekInYear
A function that returns the number of the week within a year, which is calculated in relation to the date.
For more information, refer to the ISO week date article.
ts
weekInYear(new Date(2016, 0, 1)); // Week 53, 2015
weekInYear(new Date(2016, 0, 5)); // Week 1, 2016
weekInYear(new Date(2017, 0, 1)); // Week 52, 2016
weekInYear(new Date(2017, 0, 2)); // Week 1, 2017Parameters
date
Date
The date used for the week number calculation.
weekStartDay
The first day of the week. By default, the first week day is Monday.
Returns
number
 - The number of the week within the year.