examples/javascript/tm1637.js
function update(){
    now = new Date();
    var time = now.getHours().toString() + ("0" + now.getMinutes().toString()).slice(-2);
    display.writeString(time);
    display.setColon(colon = !colon);
}
function update(){
    now = new Date();
    var time = now.getHours().toString() + ("0" + now.getMinutes().toString()).slice(-2);
    display.writeString(time);
    display.setColon(colon = !colon);
}
function update ( ) { now = new Date ( ) ; var time = now . getHours ( ) . toString ( ) + ( "0" + now . getMinutes ( ) . toString ( ) ) . slice ( - 2 ) ; display . writeString ( time ) ; display . setColon ( colon = ! colon ) ; }
Display and time update function
Display and time update function