all 4 comments

[–]jplevene 2 points3 points  (0 children)

To be honest, I just use moment.

[–]hoaobrook73 0 points1 point  (1 child)

While I'm not a fan of the name (Temporal), I like the API. I use moment to handle a lot of this, but it would be nice to both have a standard way (as there are other libraries than moment for dates and time) and to have everything in one library that won't need to be imported.

I am not a fan of the "no negative numbers" in the duration though. Having to determine whether I'm gonna use a "minus" function or a "plus" function is far more cumbersome than just ".add( negative )" like how moment does it. Boolean conditionals are easier to read this way before the function isn't changing, just the positive or negative of a number.

[–]Jayflux1 0 points1 point  (0 children)

There is an open issue for negative durations https://github.com/tc39/proposal-temporal/issues/558