added macro for displaying current date/time

This commit is contained in:
Robert Gaggl 2001-06-20 09:46:48 +00:00
parent f083851ff6
commit 4eb9174a31

13
code/Global/macros.js Normal file
View file

@ -0,0 +1,13 @@
/**
* macro renders the current timestamp
*/
function now_macro(param) {
renderPrefix(param);
var now = new Date();
if (param.format)
res.write(now.format(param.format));
else
res.write(now.format("yyyy.MM.dd HH:mm"));
renderSuffix(param);
}