mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-04-28 15:05:19 +00:00
Move the editions into a subfolder
This commit is contained in:
@@ -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);
|
||||
Reference in New Issue
Block a user