Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View olivierto's full-sized avatar

Oliviertoto olivierto

View GitHub Profile
@olivierto
olivierto / TimeClockJS.js
Last active August 13, 2018 11:52
TimeClockJs pour affiher une horloge en JS
function updateClock ( )
{
var currentTime = new Date ( );
var currentHours = currentTime.getHours ( );
var currentMinutes = currentTime.getMinutes ( );
var currentSeconds = currentTime.getSeconds ( );
// Pad the minutes and seconds with leading zeros, if required
currentMinutes = ( currentMinutes < 10 ? "0" : "" ) + currentMinutes;