toWeek

convert date to Week number

 

example:

alert(Date(2021,01,12).toWeek()) // return 2 as number, if calendar system is ISO-8601

 

The system is using the company calender settings for calculate the first day of week

if calendar system not defined, it return the first day of week related to ISO-8601