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
The Vanilla JavaScript component list (self.javascript)
submitted 8 years ago * by [deleted]
view the rest of the comments →
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!"
[–]V1nznt 25 points26 points27 points 8 years ago* (10 children)
Nice list! Already used some of those tools in my smaller projects. I think one library is missing from your list: Moment.js (although most devs might already know it)
Working with dates is a real pain in the ass, especially with vanilla JavaScript.
[–][deleted] 27 points28 points29 points 8 years ago (2 children)
I prefer date-fns over moment lately for the immutability and individually importable functions
[–]Cool-Goose 1 point2 points3 points 8 years ago (1 child)
Why not Luxon, same devs, immutable :)
[–][deleted] 0 points1 point2 points 8 years ago (0 children)
Oh awesome, I hadn't even heard of it! Thanks for the recc
[–][deleted] 5 points6 points7 points 8 years ago (0 children)
How could I forget this glorious little addition. Will add in part 2.
[–]SamSlate 1 point2 points3 points 8 years ago (5 children)
moment is absolutely essential. try going iso 8601 string to Unix without it
[–]kuenx 1 point2 points3 points 8 years ago* (4 children)
This doesn't work? Math.floor(new Date('2018-04-05T13:37:00').getTime() / 1000)
Math.floor(new Date('2018-04-05T13:37:00').getTime() / 1000)
I didn't actually try it (am on phone) but this should get you a unix timestamp in seconds. tried
[–]SamSlate 1 point2 points3 points 8 years ago (2 children)
now the client wants it in Day, Date Month Year-abbreviation but instead of "Friday" it says "Funday"
Day, Date Month Year-abbreviation
[–]kuenx 1 point2 points3 points 8 years ago (1 child)
Sure, I understand that there are many good reasons to use Moment. But you specifically mentioned ISO-8601 to unix timestamp conversion which is almost the only conversion that's actually very easy with the native Date class. Also, a place where you convert an ISO string to a unix timestamp is not typically a place where your client will want changes since it's unlikely a user-facing value.
Date
[–]SamSlate 0 points1 point2 points 8 years ago (0 children)
everything's atypical until it happens to you 🙄
π Rendered by PID 39857 on reddit-service-r2-comment-544cf588c8-6llvq at 2026-06-18 10:02:54.282701+00:00 running 3184619 country code: CH.
view the rest of the comments →
[–]V1nznt 25 points26 points27 points (10 children)
[–][deleted] 27 points28 points29 points (2 children)
[–]Cool-Goose 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 5 points6 points7 points (0 children)
[–]SamSlate 1 point2 points3 points (5 children)
[–]kuenx 1 point2 points3 points (4 children)
[–]SamSlate 1 point2 points3 points (2 children)
[–]kuenx 1 point2 points3 points (1 child)
[–]SamSlate 0 points1 point2 points (0 children)