[Helma-user] now macro with dateFormat filter
Walter Krivanek, VividVisions
walter.krivanek at vividvisions.at
Fri Feb 1 12:14:49 CET 2008
Hi,
this combination of two core module features doesn't work:
<% now | dateFormat "yyyy" %>
Because dateFormat_filter just handles Date objects but now_macro
returns a string.
I've update my local copy of dateFormat_filter to create Date objects
if input is a string.
function dateFormat_filter(input, param, format) {
var format = param.format || format;
if (!input) {
return;
} else {
if (typeof input == "string") input = new Date(input);
return input.format(format);
}
}
Bye,
Walter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2445 bytes
Desc: not available
Url : http://helma.org/pipermail/helma-user/attachments/20080201/748168b9/attachment.bin
More information about the Helma-user
mailing list