Main website; deployed on; uses GoHugo.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

38 lines
1.1 KiB

<script type="text/javascript">
const template = document.createElement("template");
template.innerHTML = `<span id="ctx"></span>`;
class JucheCalendar extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: "open" });
let currentDate = new Date();
let currentYear = currentDate.getFullYear() + 1;
let currentMonth = currentDate.getMonth() + 1;
let currentDay = currentDate.getDay() + 1;
let jucheYear = currentYear - 1912;
const content = `
<p class="phead">Juche ${jucheYear} ${currentMonth}.${currentDay}</p>
.insertAdjacentHTML("afterbegin", content);
window.customElements.define("juche-calendar", JucheCalendar);
You need to have JavaScript enabled to see the calendar widget
If you see this, there has been a problem in the initialization. Reload the page or try again later.