Files
post-self.ink/content/extras/systime.md
Madison Rye Progress 277cfc7a00 Surface errors
2025-10-05 18:07:14 -07:00

2.2 KiB

title
title
Systime
<style> .systime-form { text-align: center; } .systime-form input { font-family: Gotu, sans-serif; font-size: 20pt; margin: 0.5rem 0; text-align: center; } #output { font-color: #eaa; } </style>

You can use this form to convert to/from systime. This also includes dates in the Hebrew calendar, given their use in a few Post-Self projects.






<script type="text/javascript"> document.getElementById('convertSystime').addEventListener("click", (ev) => { fetch(`https://systime.post-self.ink/api/1/systime/${document.getElementById('systime').value}`) .then((response) => { if (!response.ok) { document.getElementById('output').innerHTML = `Error converting systime`; throw new Error(response.status); } return response.json(); }) .then(display); }); document.getElementById('convertDate').addEventListener("click", (ev) => { fetch(`https://systime.post-self.ink/api/1/date/${document.getElementById('date').value}`) .then((response) => { if (!response.ok) { document.getElementById('output').innerHTML = `Error converting date`; throw new Error(response.status); } return response.json(); }) .then(display); }); function display(json) { document.getElementById('output').innerHTML = ``; document.getElementById('systime').value = json.systime.string; document.getElementById('date').value = json.gregorian.string; document.getElementById('hebrew').value = json.hebrew.string; } </script>