<span class="otc-output"></span>
<script>
const now = new Date();
const currentYear = now.getFullYear();
const dayGet = 1000 * 60 * 60 * 24;
let cycleStart, cycleEnd, yearOtc;
const march20ThisYear = new Date(currentYear, 2, 20);
if (now >= march20ThisYear) {
cycleStart = march20ThisYear;
cycleEnd = new Date(currentYear + 1, 2, 20);
yearOtc = currentYear - 2000;
} else {
cycleStart = new Date(currentYear - 1, 2, 20);
cycleEnd = march20ThisYear;
yearOtc = currentYear - 2001;
}
const leapCount = Math.round((cycleEnd - cycleStart) / dayGet);
const daysElapsed = Math.ceil((now - cycleStart) / dayGet);
const daysRemaining = leapCount - daysElapsed;
const weekOtc = Math.ceil(daysElapsed / 5);
const otcMsg = `${daysElapsed} (-${daysRemaining}) ${weekOtc}`;
const otcYear = `4,547,742,0${yearOtc} (0${yearOtc})`;
const output = document.getElementById('otc-output');
if (output) {
output.innerHTML = `${otcMsg}
${otcYear}`;
}</script>