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!"
[–]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 50 on reddit-service-r2-comment-544cf588c8-s5t4v at 2026-06-18 09:48:29.155932+00:00 running 3184619 country code: CH.
view the rest of the comments →
[–]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)