dd
Insert current date in standard written U.S. English format.

Script key: Insert current date in standard written U.S. English format.

Posted by jbwhaley

Install

Details

Label dd
Voice Over Insert current date in standard written U.S. English format.
Script
var now = new Date();
var dd = now.getDate();
var yyyy = now.getFullYear();

var month = new Array();
month[0] = "January";
month[1] = "February";
month[2] = "March";
month[3] = "April";
month[4] = "May";
month[5] = "June";
month[6] = "July";
month[7] = "August";
month[8] = "September";
month[9] = "October";
month[10] = "November";
month[11] = "December";
var mm = month[now.getMonth()];

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

Advanced

Keyboard shortcut None
Hide key Yes

Discussion

comments powered by Disqus