( function(x){return x*x;} ) ( 3 ) // 9 document.querySelectorAll() настоящий массив — потому, что понадобится его метод forEach()const D = new Date(ts);
const now = new Date();
D.setFullYear( now.getFullYear());
D.setMonth( now.getMonth());
D.setDate( now.getDate());
if (D > now) D.setDate( now.getDate() - 1);
На фронт поступает пуш, и там появляется кнопка Скачать.
Гнать файлы через php нежелательно, поэтому отдаются самим nginx.