Parse Date Format

  1. npm install moment-parseformat

This plugin extracts the format of a date/time string.

  1. var format = moment.parseFormat('Thursday, February 6th, 2014 9:20pm');
  2. // dddd, MMMM Do, YYYY h:mma
  3. moment().format(format); // format

That allows to create smart date inputs that let your users set aDate/Time and lets you extract the user's preferred format for future usage.Find an example usage of it at minutes.io.

The Plugin has been authored by @gr2m.Links: Demo |Source