I want to display {{name}} - {{createdAt}}
, but i get the format from database pop - Thu Aug 25 2016 20:42:00 GMT+0300 (GTB Summer Time)
How do i change the format to something more friendly like yyyy-MM-dd
Collection:
Cvs = new Mongo.Collection('cvs');
...
createdAt: {
type: Date,
I tried like in this example
Template.registerHelper("prettifyDate", function(timestamp){
return new Date(timestamp).toString('yyyy-MM-dd')
})
{{prettifyDate createdAt}}
, but nothing is changed.