<commit_before># angular-date-converter
A AngularJS package delivering directive to convert a date before passing it to ngModel <commit_msg>Readme updated<commit_after># angular-date-converter
A AngularJS package delivering directive to convert a date before passing it to ngModel 

### Installation

    bower install YezanR/angular-date-converter

In your `index.html` include the following scripts:

    <script src="bower_components/moment/moment.js"></script>
    <script src="bower_components/angular-moment/angular-moment.min.js"></script>
    <script src="bower_components/date-converter/dist/p2DateEnToFr.min.js"></script>

Inject the dependecy module:

    angular.module('demo', ['p2DateConverter.p2DateEnToFr']);

### Usage

If you wish to convert a date from french to english of an input, use can add the 'p2-date-en-to-fr' directive:

    <input type="text" ng-model="user.date_of_birth" p2-date-en-to-fr >

This would convert the date to french format before binding it to the model
{'fraction_non_alphanumeric': 0.09919839679358718, 'fraction_numerical': 0.00501002004008016, 'mean_word_length': 4.842105263157895, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '999193', 'n_tokens_mistral': 308, 'n_tokens_neox': 295, 'n_words': 95}