Hacker News new | past | comments | ask | show | jobs | submit login

Though nice to see moment and webpack



Agreed, at least with webpack. My number one gripe with moment is that I have to shim it in when using webpack. It still expects to be added to global scope, just like jquery. I'd really like to find a modular version, or another project that has as much functionality.


I haven't had any problem with `require('moment')` doesn't leak into my global scope. jQuery is a different story, given how plugins tend to work.


Hello, date-fns author here (a Moment competitor). date-fns was designed for use with webpack, so unlike Moment it won't bloat your build with unused function. If you don't need IANA support, you'll love it https://date-fns.org/


moment.js is a monolithic beast. I would love to see date-fns instead https://github.com/date-fns/date-fns


Nice, ask and ye shall receive. I'm going to have to check this out. There's so much to moment though, is it missing any key features of moment?


Hi, the date-fns creator here. We don't have extended time zone support (IANA) and have much fewer translations. But all of that is in progress. Regarding date-manipulations date-fns combines all of the Moment functions and even more (that we found in other libraries; ~150 in total). Check it out: https://github.com/date-fns/date-fns


Thank you for kind words!


And mocha


and lodash.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: