Skip to content

Instantly share code, notes, and snippets.

@Askerad
Last active April 4, 2020 08:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Askerad/f4d3320f2ebb9d4370798321e15ed928 to your computer and use it in GitHub Desktop.
Save Askerad/f4d3320f2ebb9d4370798321e15ed928 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>A simple clock</title>
</head>
<body translate="no" >
<div id="output"></div>
<script>
var options = {};
options.hour = "numeric";
options.minute = "numeric";
var date = new Date(Date.now());
console.log(date.toString());
var output = document.getElementById("output");
output.innerHTML = date.toLocaleTimeString("fr", options);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment