loading...

re: 4 alternatives to moment.js for internationalizing dates VIEW POST

FULL DISCUSSION
 

Version 2, the latest at the time of this writing, only comes in the form of an NPM package, so if you want to use it directly in a browser, you’ll have to use a bundler like Browserify.

FYI, you can use a tool like pika.dev to use many npm packages in the browser directly (like ‘date-fns’). E.g. this link works for ‘date-fns’ cdn.pika.dev/date-fans/v2

The only requirement is that the package provide a es6 module export (which, while not universal, is very common).

Another option is unpkg.com. There are likely more which I’m not aware of.

 
 

Ha! It's got to be a sign of success when strangers start advising you to use your own project! This being said, why didn't you mention it right there in the post 🤔?

code of conduct - report abuse