Time
Insert current time 24h

Script key: Insert current time 24h

Posted by macieksmola

Install

Details

Label Time
Voice Over Insert current time 24h
Script
var now = new Date();
var hh =now.getHours();
var mm = now.getMinutes();

if(hh<10) {
    hh='0'+hh
}

if(mm<10) {
    mm='0'+mm
} 

var time = hh+':'+mm+'';
var selRange = getSelectedRange();
setSelectedText(time);
setSelectedRange(selRange[0]+9,0);

Advanced

Keyboard shortcut None
Hide key Yes

Discussion

comments powered by Disqus