Add a new journal page toolbar button

Spot the easter egg with the toolbar button…

Fixes #336
This commit is contained in:
Jermolene
2014-10-08 17:46:34 +01:00
parent 0dcf54c3b5
commit e872f17842
7 changed files with 89 additions and 1 deletions
+32
View File
@@ -0,0 +1,32 @@
/*\
title: $:/core/modules/macros/now.js
type: application/javascript
module-type: macro
Macro to return a formatted version of the current time
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Information about this macro
*/
exports.name = "now";
exports.params = [
{name: "format"}
];
/*
Run the macro
*/
exports.run = function(format) {
return $tw.utils.formatDateString(new Date(),format || "0hh:0mm, DDth MMM YYYY");
};
})();