Simple Date Formatting with Vanilla JavaScript




There are now ways to format dates in JavaScript without using a library like moment.js. In this tutorial we will look at toLocaleString and how to specify date and time formats.

Would you like to help keep this channel going?
https://www.patreon.com/allthingsjavascript

Access to EVERY course (get 2 months free): https://www.skillshare.com/r/profile/Steven-Hancock/24508

Courses offered on Udemy at a discount:

Getting Started: https://www.udemy.com/learn-modern-javascript-getting-started/?couponCode=GETTINGSTARTED2019

Advanced Topics: https://www.udemy.com/learn-modern-javascript-advanced-topics/?couponCode=ADVANCED2019

Mastering Regular Expressions in JavaScript:
https://www.udemy.com/mastering-regular-expressions-in-javascript/?couponCode=YOUTUBE

Functional Programming in JavaScript: https://www.udemy.com/functional-programming-in-javascript-a-practical-guide/?couponCode=YOUTUBE19

NEW Mastering JavaScript Arrays: https://www.udemy.com/course/mastering-javascript-arrays/?couponCode=YOUTUBE19

Tutorials referred to in this video:
Formatting time: https://youtu.be/j8katkbMVhs

For more resources on JavaScript:
http://www.allthingsjavascript.com

#javascript #AllThingsJavaScriptLLC

Original source


6 responses to “Simple Date Formatting with Vanilla JavaScript”

  1. I was looking for that right now I thought you might have a old video about it but I found that recent video that I somehow missed I think the format I need for my project is toISOString() I cannot understand how it works under the hood I inputted many different formats 14-09-2019 or 14/09/2019 or 14.09.2019 or 14 September 2019 etc (or something similar to that)

Leave a Reply