text: (function(){tinymce.create("tinymce.plugins.InsertDateTime",{init:function(e){var t=this;t.editor=e,e.addCommand("mceInsertDate",function(){var i=t._getDateTime(new Date,e.getParam("plugin_insertdate_dateFormat",e.getLang("insertdatetime.date_fmt")));e.execCommand("mceInsertContent",!1,i)}),e.addCommand("mceInsertTime",function(){var i=t._getDateTime(new Date,e.getParam("plugin_insertdate_timeFormat",e.getLang("insertdatetime.time_fmt")));e.execCommand("mceInsertContent",!1,i)}),e.addButton("insertdate",{title:"insertdatetime.insertdate_desc",cmd:"mceInsertDate"}),e.addButton("inserttime",{title:"insertdatetime.inserttime_desc",cmd:"mceInsertTime"})},getInfo:function(){return{longname:"Insert date/time",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/insertdatetime",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getDateTime:function(e,t){function i(e,t){if(e=""+e,t>e.length)for(var i=0;t-e.length>i;i++)e="0"+e;return e}var n=this.editor;return t=t.replace("%D","%m/%d/%y"),t=t.replace("%r","%I:%M:%S %p"),t=t.replace("%Y",""+e.getFullYear()),t=t.replace("%y",""+e.getYear()),t=t.replace("%m",i(e.getMonth()+1,2)),t=t.replace("%d",i(e.getDate(),2)),t=t.replace("%H",""+i(e.getHours(),2)),t=t.replace("%M",""+i(e.getMinutes(),2)),t=t.replace("%S",""+i(e.getSeconds(),2)),t=t.replace("%I",""+((e.getHours()+11)%12+1)),t=t.replace("%p",""+(12>e.getHours()?"AM":"PM")),t=t.replace("%B",""+n.getLang("insertdatetime.months_long").split(",")[e.getMonth()]),t=t.replace("%b",""+n.getLang("insertdatetime.months_short").split(",")[e.getMonth()]),t=t.replace("%A",""+n.getLang("insertdatetime.day_long").split(",")[e.getDay()]),t=t.replace("%a",""+n.getLang("insertdatetime.day_short").split(",")[e.getDay()]),t=t.replace("%%","%")}}),tinymce.PluginManager.add("insertdatetime",tinymce.plugins.InsertDateTime)})();