/**
 * We date formater helper
 *
 * usage:  {{we-date date format}}
 */
var moment = require('moment');

module.exports = function(we) {
  return function renderDate(date, format) {
    if (!date) return '';
    var options = arguments[arguments.length-1];

    var d = moment(date);
    if (!d.isValid()) return '';

    var req = options.data.root.req;
    if (!req) req = this.locals.req;
    if (req && req.user) d.locale(req.user.language);

    if (format && typeof format === 'string') {
      return d.format(format);
    } else {
      return d.format(we.config.date.defaultFormat);
    }
  }
}
@@ -320,16 +320,60 @@
     var 
+req;%0A    if (options.data.root.req) %7B%0A      
 req = op
@@ -389,24 +389,31 @@
 a.root.req;%0A
+    %7D%0A%0A
     if (!req
@@ -424,12 +424,25 @@
 q = 
-this
+options.data.root
 .loc

add suport to use we-date in widgets