Template:IxTimeConvert
Loading... <script> (function() {
function convertToIxTime(year, month, day) { var epoch = new Date(2020, 9, 4).getTime() / 1000; var inputDate = new Date(year, month - 1, day).getTime() / 1000; var secondsSinceEpoch = inputDate - epoch; var ixTime = Math.floor(secondsSinceEpoch * 4.0 + epoch); var ixDate = new Date(ixTime * 1000); var options = { weekday: "long", year: "numeric", month: "long", day: "numeric", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: "short", }; return ixDate.toLocaleString("en-US", options); }
var params = "Template:1|Template:2|Template:3".split('|'); var year = parseInt(params[0]) || new Date().getFullYear(); var month = parseInt(params[1]) || (new Date().getMonth() + 1); var day = parseInt(params[2]) || new Date().getDate();
var result = convertToIxTime(year, month, day); document.getElementById("ix-time-convert-1732592504").textContent = result;
})(); </script>