Skip to content
Translates the `java.text.SimpleDateFormat` date format to the `moment.js` date format.
JavaScript HTML
Find file
Failed to load latest commit information.
test Translate Java.SimpleDateFormat 'yyy'. Jun 25, 2015
.gitignore Expanded .gitignore to ignore EditPlus *.bak files. Jan 10, 2014
.jshintrc Initial commit Dec 10, 2013
.npmignore
.travis.yml Removed nodejs version 0.8 from travic-ci config Jan 29, 2015
Gruntfile.js Excluded the moment-jdateformatparser.min.js file from the jshint task. Dec 18, 2013
LICENSE Initial commit Dec 10, 2013
README.md Update README.md Sep 16, 2014
bower.json Version bump to v1.0.2 because of checksum issues in the npm registry Feb 10, 2016
moment-jdateformatparser.js fix day-of-week format mapping Feb 4, 2016
moment-jdateformatparser.min.js Updated `moment-jdateformatparser.min.js` Feb 4, 2016
package.json Version bump to v1.0.2 because of checksum issues in the npm registry Feb 10, 2016

README.md

moment-jdateformatparser

NPM Build Status

This moment.js plugin translates the java.text.SimpleDateFormat date format to the moment.js date format.

We took the structure graciously from https://github.com/niwibe/moment-tokens (thanks a lot!).

Usage

  • formatWithJDF: Formats the moment with a java date format.

    e.g.: moment("2013-12-24 14:30").formatWithJDF("dd.MM.yyyy") will return 24.12.2013

  • toMomentFormatString: Translates the java date format to a momentjs format.

    e.g.: moment().toMomentFormatString("dd.MM.yyyy") will return DD.MM.YYYY

  • toJDFString: Translates the momentjs format to a java date format.

    e.g.: moment().toJDFString("DD.MM.YYYY") will return dd.MM.yyyy

Installation

NPM

Installation is possible with npm install moment-jdateformatparser

Bower

Installation is possible with bower install moment-jdateformatparser

License

moment-jdateparser is freely distributable under the terms of the MIT license.

Copyright (c) 2013 Heinz Romirer, Martin Groller

Something went wrong with that request. Please try again.