Translates the `java.text.SimpleDateFormat` date format to the `moment.js` date format.
Clone or download
herom Merge pull request #31 from alexnez96/bug/fix-escape-chars
Fix regex to match escape chars when converting to moment format
Latest commit 434b969 Sep 2, 2018


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 (thanks a lot!).


  • 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 is possible with npm install moment-jdateformatparser


Installation is possible with bower install moment-jdateformatparser


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

Copyright (c) 2013 Heinz Romirer, Martin Groller