Last Sync: 2026-01-24 12:45 (Mobile)

This commit is contained in:
2026-01-24 12:45:51 +09:00
parent df4394ad97
commit 390ab0e81c
812 changed files with 3 additions and 3 deletions

View File

@@ -0,0 +1,10 @@
<%
const getWeekNumber = (dateFrom = new Date()) => {
const currentDate = dateFrom.getDate();
const startOfMonth = new Date(dateFrom.setDate(1));
const weekDay = startOfMonth.getDay();
return parseInt(((weekDay - 1) + currentDate) / 7) + 1;
}
getWeekNumber(new Date());
getWeekNumber(new Date('2020-01-28'));
%>