/moment.parseFormat

A moment.js plugin to extract the format of a date/time string

Primary LanguageJavaScript

moment.parseFormat – a moment.js plugin

A moment.js plugin to extract the format of a date/time string

Installation

Install using bower for usage in browser:

bower install --save moment-parseformat

Install using npm for node.js:

npm install --save moment-parseformat

Browser Usage

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

Node / CommonJS Usage

var moment  = require 'moment'
var parseFormat = require('moment-parseformat')

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

Fine Print

The moment.parseFormat Plugin have been authored by Gregor Martynus, proud member of Team Hoodie. Support our work: gittip us.

License: MIT