First step of turning the rabbit hole inside out

This commit is contained in:
Jeremy Ruston
2012-05-05 22:49:23 +01:00
parent 3b80d7e9c1
commit 9a69e89465
734 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
/*
jquery.tw.macro.today.js
jQuery TiddlyWiki <<today>> macro
*/
(function($) {
$.fn.tw_today = function(args) {
args.format = args.format || args[1];
var opts = $.extend({},$.fn.tw_today.defaults,args);
var now = new Date();
var text = now.formatString(opts.format.trim());
this.append("<span>"+text+"</span>");
return this;
};
$.fn.tw_today.defaults = {format:"ddd mmm 0DD 0hh:0mm:0ss YYYY"};
})(jQuery);