Today I learned
  • Home
  • Github
  • Linkedin
  • Nomad Life(Travel Blog)
Subscribe
Tagged

moment.js

A collection of 1 post

meteor

Format time using moment.js in meteor

If you want to format a time field from you database, say for e.g.: createdAt, the following helper can be used. UI.registerHelper('formatTime', function(context, options) { if(context) return moment(context).format('MM/DD/YYYY'); }); An alternate way would be to write a helper for one particular view,

  • Manu S Ajith
Manu S Ajith Jan 7, 2016 • 1 min read
Today I learned © 2022
Powered by Ghost