Last Updated: February 25, 2016
·
1.075K
· royletron

Using time in Meteor

Picture

Defining dates and time is always an arse in any language, even more so with Javascript. Thankfully MomentJs helps enormously and using it with Meteor makes dates a doddle.

My tip for sanity is to save all dates as timestamps (better for logical comparison) and then convert them to readable dates on the client using moment... Hasseeeesh!

2 Responses
Add your response

That's an excellent library, I've never seen that before. Another excellent one is Sugar.js, which has an amazing Date library too: http://sugarjs.com/dates

over 1 year ago ·

That sure is purty looking syntax. Will be sure to check it out.

over 1 year ago ·