Начало
Часы
Недельные Даты
Показывает начало и даты окончания в течение текущей недели.
JavaScript Clocks: Недельные Даты
<!-- TWO STEPS TO INSTALL WEEK DATES: 1. Copy the coding into the HEAD of your HTML document 2. Add the last code into the BODY of your HTML document --> <!-- STEP ONE: Paste this code into the HEAD of your HTML document --> <HEAD> <SCRIPT LANGUAGE="JavaScript"> <! > <! > <!-- Begin function formatDate(date) { var mymonth = date.getMonth()+1; var myweekday = date.getDate(); return (mymonth + "/" + myweekday); } function printWeek() { var now = new Date(); var nowDayOfWeek = now.getDay(); var nowDay = now.getDate(); var nowMonth = now.getMonth(); var nowYear = now.getYear(); nowYear += (nowYear < 2000) ? 1900 : 0; var weekStartDate = new Date(nowYear, nowMonth, nowDay - nowDayOfWeek); var weekEndDate = new Date(nowYear, nowMonth, nowDay + (6 - nowDayOfWeek)); document.write("Current Week: " + formatDate(weekStartDate) + " - " + formatDate(weekEndDate)); } // End --> </script> </HEAD> <!-- STEP TWO: Copy this code into the BODY of your HTML document --> <BODY> <script> printWeek(); </script> <!-- Script Size: 1.30 KB -->