How can I get today's date and time in Meteor?
1 answer
You can use standard javascript for today's date:
var bugun=new Date();
To format it and get smaller fonts it's nice to use the momentjs package:
Add this to your meteor project:
meteor add momentjs:moment
Then you can do this instead of the above:
var date = new Date()
var begun = moment(date).format("MM.DD.YYYY");
+5
source to share