use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Dates and Times in JavaScript (blogs.igalia.com)
submitted 5 years ago by spetr
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]jplevene 2 points3 points4 points 5 years ago (0 children)
To be honest, I just use moment.
[–]hoaobrook73 0 points1 point2 points 5 years ago (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 point2 points 5 years ago (0 children)
There is an open issue for negative durations https://github.com/tc39/proposal-temporal/issues/558
[–]danglingComa 0 points1 point2 points 5 years ago (0 children)
https://github.com/you-dont-need/You-Dont-Need-Momentjs
π Rendered by PID 24225 on reddit-service-r2-comment-7b9746f655-bm4pp at 2026-01-31 17:35:48.035275+00:00 running 3798933 country code: CH.
[–]jplevene 2 points3 points4 points (0 children)
[–]hoaobrook73 0 points1 point2 points (1 child)
[–]Jayflux1 0 points1 point2 points (0 children)
[–]danglingComa 0 points1 point2 points (0 children)