Date
Insert today's date

Script key: Insert today’s date

Posted by macieksmola

Install

Details

Label Date
Voice Over Insert today's date
Script
var now = new Date();
var dd = now.getDate();
var mm = now.getMonth()+1;

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

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

var today = dd+'/'+mm+' ';
var selRange = getSelectedRange();
setSelectedText(today);
setSelectedRange(selRange[0]+today.length,0);

Advanced

Keyboard shortcut None
Hide key Yes

Discussion

comments powered by Disqus