However, if you are working with dates like, displaying localized dates and avoiding pitfalls of Javascript’s Date constructor becomes much harder. If your server provides ISO 8601 dates, you are in luck.When testing out your solutions, it is always good to test languages like Korean and Arabic to make sure you logic will work.For example, ko (Korean) Meridien time (AM/PM) shows up at the start of the time result, whereas in English, the Meridien time shows up at the end. Things are not as easy as they seem, especially if you plan on manually parsing the output from the native APIs.You do not need Moment.js if you support newer browsers and if you show dates or datetimes only in your user’s timezone.If you also can remove moment-timezone, your savings will be even greater. By cutting 30kb off our JS bundle, we can deliver and parse the payload faster so users can start interacting with our application sooner. JavaScript payload size was the biggest driver for looking to alternative solutions.Supportįirst, let’s discuss some preliminary points to help us prepare for the rest of the article. Let’s talk about why we can simply “use the platform” and also provide you with an arsenal of generic examples that will hopefully apply to your applications. I don’t often hear it said in simple terms–why one can, and should, look to alternatives for Moment.js. And, the truth is, you probably don’t need Moment.js.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |