Sha256: 054e41f61a25efbdf40cb71d762b96f8020cb7b79327793df7ee1c7dff835050

Contents?: true

Size: 237 Bytes

Versions: 5

Compression:

Stored size: 237 Bytes

Contents

Handlebars.registerHelper('moment', function(date, options) {
  var m = moment(date);
  var format = options.hash.format;

  if (format && format !== 'calendar') {
    return m.format(format);
  } else {
    return m.calendar();
  }
});

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
slices-2.0.2 app/assets/javascripts/slices/app/helpers/moment.js
slices-2.0.1 app/assets/javascripts/slices/app/helpers/moment.js
slices-2.0.0 app/assets/javascripts/slices/app/helpers/moment.js
slices-1.0.5 app/assets/javascripts/slices/app/helpers/moment.js
slices-1.0.4 app/assets/javascripts/slices/app/helpers/moment.js