JavaScript Получите текущую неделю номер
function weekNumber(date = new Date())
{
var firstJanuary = new Date(date.getFullYear(), 0, 1);
var dayNr = Math.ceil((date - firstJanuary) / (24 * 60 * 60 * 1000));
var weekNr = Math.ceil((dayNr + firstJanuary.getDay()) / 7);
return weekNr;
}
Denis Starikov