MVE SLW FST Knowledge center
A space to learn, discover and expand your knowledge
<!-- Code by F’in sweet Webflow Hacks -->
<script>
// on DOM ready
document.addEventListener("DOMContentLoaded", function(){
//set your formatting options
//Version 1 output = "16:09:19"
const timeVersion1 = {
timeZone:"Europe/Berlin", //use any time zone in the TZ database name column https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
hour12 : false,
hour: "2-digit",
minute: "2-digit",
second: "2-digit"
}
// Update the text content of our text elements with the formatted time
document.querySelector('.hack23-time-version1').textContent = new Date().toLocaleTimeString('en-US', timeVersion1);
document.querySelector('.hack23-time-version2').textContent = new Date().toLocaleTimeString('en-US', timeVersion2);
});
/*
the Mozilla docs are the most full and complete source for
customization options for .toLocaleTimeString()
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString
*/
</script>