I moved on to use Luxon and felt its API very well. But the performance is also a factor to concern, so I did a small test:
moment('2018-01-01').format('YYYYMMDD')
vs
luxon.DateTime.fromISO('2018-01-01').toFormat('YYYYMMDD')
repeart 10000 times.
Link: https://codepen.io/thetuyen/pen/ejqMVp?editors=1000
Using performance tool of chrome, results:
With formatting luxon slower than moment from 15 to 20 times. I was thought luxon would be faster!
The problem here is that Luxon is choosing to use the Intl API to generate the strings here instead of its hardcoded English strings. Intl is really slow, so the call is slow. Since you haven't set any locale info, Luxon should be able to do this without Intl work, so this is a bug.
Now that I've finally gone and looked at this, that wasn't the problem at all. The problem is that you used "YYYYMMDD", when you meant "yyyyMMdd". "DD" means "localized date with abbreviated month" (see here). That requires Intl to compute, even in English.
Once fixed, still a little slower, but not by much:

Now that I've finally gone and looked at this, that wasn't the problem at all. The problem is that you used "YYYYMMDD", when you mean "yyyyMMdd". "DD" means something "medium local date format", which requires Intl to compute.
Today I learn this
This is ridiculous. How can a native module be so shitty....
Most helpful comment
The problem here is that Luxon is choosing to use the Intl API to generate the strings here instead of its hardcoded English strings. Intl is really slow, so the call is slow. Since you haven't set any locale info, Luxon should be able to do this without Intl work, so this is a bug.