tiddlywiki
Version:
a non-linear personal web notebook
28 lines (20 loc) • 406 B
JavaScript
/*\
title: $:/core/modules/macros/now.js
type: application/javascript
module-type: macro
Macro to return a formatted version of the current time
\*/
;
/*
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");
};