How to manipulate Australian date format using Moment.js

Spencer Feng
Mar 3, 2019

--

In a project I recently worked on, I needed to do a lot of manipulation on date in Australian format (DD/MM/YYYY). In this article, I will share some code about how to do it easily with Moment.js

What the above code does is:

  • Create a Moment.js object with the date string and its format information
  • Once we have a Moment.js object, we are able to create a new date string with provided format information with .format() method.

If you find this article helpful, please visit my YouTube channel where you might find some helpful programming tips as well.

--

--

Spencer Feng
Spencer Feng

Written by Spencer Feng

Full-stack developer in Sydney

No responses yet