haven’t used it, and haven’t used momemt much recently.
It’s not “wrong” per se, but the API looks kinds strange. So.much.chaining.Why.so.much.chaining I know many assert libraries are reliaing on chaining, too, and though it looks kinda slick in examples it’s very annowying to use.
example:
expect(x).to.be.deep.equal.to(y)
yes it’s cute. But it’s super anoying to type because the whole chain of properties/methods is expressing the single concept. One concept = one methog call.
I looked through the API docs for Luxon and there are methogs that take object hashes to do the same thing as the method chain on your home page. I think you should focus on that.
Also, stringly typing leaks in some cases: DateTime.endOf(‘day’). Why is ‘day’ a string? Why is it not .endOfDay()?
I took a quick glance over date-fns. Their examples in general look like this:
import {operation} from ‘date-fns’
const changedDate = operation(Date);
1 function, 1 operation. No chains, no wrapping objects. No BS.
You do stuff right: you rely on Intl and polyfils, you keep the library small, etc. But as it is now I’d pick date-fns over Luxon.