Skip to content

Translates the `java.text.SimpleDateFormat` date format to the `moment.js` date format.

License

Notifications You must be signed in to change notification settings

MadMG/moment-jdateformatparser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1bf1c63 · Jun 26, 2018

History

70 Commits
Apr 3, 2018
Jan 10, 2014
Jun 15, 2018
Dec 18, 2013
Jan 29, 2015
Dec 18, 2013
Dec 10, 2013
Jul 21, 2017
Jun 26, 2018
Jun 15, 2018
Jun 15, 2018
Jun 26, 2018

Repository files navigation

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

About

Translates the `java.text.SimpleDateFormat` date format to the `moment.js` date format.

Resources

License

Stars

Watchers

Forks

Packages

No packages published