Using time in Meteor
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!
Written by Darren
Related protips
2 Responses
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
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Time
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#