Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • 3
    Answers can't improve if you downvote without giving a reason.
    – Ouroborus
    Commented Jul 26, 2016 at 18:22
  • The OP asked for a JavaScript solution, not a framework/library.
    – mattpark22
    Commented Jul 27, 2016 at 11:22
  • 2
    @mattpark22 While I understand what you're getting at, a javascript library is still javascript. I could rip out just the relevant pieces of the library and present those as a code solution. OP would have an answer that was javascript, in the sense that you mean it, but would be unaware of a (possibly) acceptable, general purpose solution. Also, adding 30 minutes is not nearly as trivial as most of the answers make it sound, as there are a lot of edge cases not handled by the Date object. For example, the most popular answer breaks when crossing DST boundaries.
    – Ouroborus
    Commented Jul 27, 2016 at 18:33
  • @Ouroborus—libraries should not be the only solution provided if the OP has not asked for a library in the OP or tags. Otherwise, answers can become just a litany of ways to do something in different libraries and the OP is left no wiser to their actual issue (which in this case is fairly trivial to solve).
    – RobG
    Commented Mar 1, 2017 at 5:36
  • 1
    @RobG No one's suggesting that only library solutions should be provided. OP can't specifically ask for a library as that would cause the question to be off-topic. Asking "How do I do it with JavaScript?" could be construed as specifying that this is specific to javascript (asking for a solution in a specific language as opposed to asking for a raw code solution) especially given that this detail is repeated in the title and the tags.
    – Ouroborus
    Commented Mar 1, 2017 at 17:08