More Null Issues

40 views
Skip to first unread message

Shaun Forsyth

unread,
Apr 9, 2014, 8:46:57 AM4/9/14
to jsmartdi...@googlegroups.com
In jSmart.prototype.makeTimeStamp = function(s) you appear to decide to return now if no value is present. from testing smarty no value or undefined, will not return anything.

I changed the date_format modifier to

jSmart.prototype.registerPlugin(
        'modifier',
        'date_format',
        function(s, fmt, defaultDate)
            {
            if (!s)
            {
                return '';
            }
            return jSmart.prototype.PHPJS('strftime','date_format').strftime(fmt?fmt:'%b %e, %Y', jSmart.prototype.makeTimeStamp(s?s:defaultDate));
        }
    );

Max Miroshnikov

unread,
Dec 26, 2014, 10:32:03 AM12/26/14
to jsmartdi...@googlegroups.com
thanks
fixed in 2.11

Shaun Forsyth

unread,
Dec 26, 2014, 10:42:44 AM12/26/14
to jsmartdi...@googlegroups.com
Thank you!
Have a good new year!

--
You received this message because you are subscribed to a topic in the Google Groups "jSmart - JavaScript template engine with Smarty syntax" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jsmartdiscussion/e4j6ovL8x_M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jsmartdiscussi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages