Using the library Datejs you can accomplish this quite elegantly, with its toString
format specifiers: http://jsfiddle.net/TeRnM/1/.
var date = new Date(1324339200000);
date.toString("MMM dd"); // "Dec 20"
More Related Contents:
- How can I upload files asynchronously with jQuery?
- Why does my JavaScript code receive a “No ‘Access-Control-Allow-Origin’ header is present on the requested resource” error, while Postman does not?
- Stop form refreshing page on submit
- Variable doesn’t get returned from AJAX function
- navigator.geolocation.getCurrentPosition sometimes works sometimes doesn’t
- How to differentiate single click event and double click event?
- TypeError: p.easing[this.easing] is not a function
- Rails 5: how to use $(document).ready() with turbo-links
- How to unbind a listener that is calling event.preventDefault() (using jQuery)?
- Hide scrollbar while still being able to scroll with mouse/keyboard [duplicate]
- JavaScript/jQuery check broken links
- JavaScript – head, body or jQuery?
- How do I replace the entire HTML node using jQuery
- Change URL and redirect using jQuery
- How do I drag multiple elements at once with JavaScript or jQuery?
- Difference between screen.availHeight and window.height()
- Simulate drop file event
- How to generate a thumbnail image after adding an image inside an input type=”file” in a form and submitting them both on the same form
- Can you have a JavaScript hook trigger after a DOM element’s style object changes?
- Get image preview before uploading in React
- jQuery x y document coordinates of DOM object
- How do I capture a key press (or keydown) event on a div element?
- How to create a new img tag with JQuery, with the src and id from a JavaScript object?
- SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
- Jquery: Filter dropdown list as you type [closed]
- Convert JavaScript variable value to csv file
- How to stop user from printing webpages? using javascript or jquery
- How should I crop an image at client side using jcrop and upload it?
- How to avoid conflict between JQuery and Prototype
- Removing element with jQuery?