<script> let moonBegin = 1613032380000; let moonMonth = 29.53059 * 24 * 60 * 60 * 1000; let now = Date.now() let moonDay = ((now - moonBegin) % moonMonth)/(moonMonth/30)|0; document.write(`Сейчас ${moonDay} лунный день`) </script>