jdate-converter

1.0.0 • Public • Published

jdate-converter

A simple library to convert Java date & time format to JavaScript date & time format (used for example in moment.js).

Based on:

Usage

Install with npm (or bower) and then:

var converter = require("jdate-converter");

var date = converter.toJsDate("dd/MM/yyyy")

// date = "DD/MM/YYYY"

Usage in AngularJS

Install with npm (or bower) and then add module jdateConverter to your app. Now you can use service named jdateConverter:

angular.module("yourModule")
    .controller("YourService", function($scope, jdateConverter) {
        $scope.myDateFormat = jdateConverter.toJsDate("dd/MM/yyyy");
        // $scope.myDateFormat should be "DD/MM/YYYY"
    };

Important: service have working format cache (you don't have to create it on your own).

Contribution

You're interested in contributing? Awesome! Fork, make change, commit and create pull request. I'll do my best to merge changes!

License

MIT

Package Sidebar

Install

npm i jdate-converter

Weekly Downloads

58

Version

1.0.0

License

MIT

Unpacked Size

37.1 kB

Total Files

13

Last publish

Collaborators

  • elwin013