{"_id":"jquery-formatdatetime","_rev":"8-6f0f12219600d712541f01a73f0d1bbd","name":"jquery-formatdatetime","description":"A jQuery plugin that converts a date object to a supplied format. It was forked from the jQuery UI DatePicker module to support time formatting as well as the original date formatting.","dist-tags":{"latest":"1.1.6"},"versions":{"1.1.4":{"name":"jquery-formatdatetime","title":"jQuery Format Date/Time","description":"A jQuery plugin that converts a date object to a supplied format. It was forked from the jQuery UI DatePicker module to support time formatting as well as the original date formatting.","keywords":["format","date","time","datetime"],"version":"1.1.4","author":{"name":"Adam Gschwender","email":"adam.gschwender@gmail.com","url":"http://gschwa.com/"},"maintainers":[{"name":"agschwender","email":"adam.gschwender@gmail.com"}],"licenses":[{"type":"MIT","url":"https://github.com/agschwender/jquery.formatDateTime/blob/master/MIT-LICENSE.txt"},{"type":"GPLv2","url":"https://github.com/agschwender/jquery.formatDateTime/blob/master/GPL-LICENSE.txt"}],"bugs":{"url":"https://github.com/agschwender/jquery.formatDateTime/issues"},"homepage":"https://github.com/agschwender/jquery.formatDateTime","docs":"https://github.com/agschwender/jquery.formatDateTime/blob/master/README.md","download":"https://github.com/agschwender/jquery.formatDateTime/archive/master.zip","repository":{"type":"git","url":"git://github.com/agschwender/jquery.formatDateTime.git"},"main":"jquery.formatDateTime","files":["jquery.formatDateTime.js","README.md"],"engines":{"node":">=0.8"},"scripts":{"test":"grunt test --verbose"},"devDependencies":{"grunt":"~0.4.1","grunt-contrib-concat":"~0.3.0","grunt-contrib-jasmine":"~0.5.1","grunt-contrib-jshint":"~0.6.2","grunt-contrib-uglify":"~0.2.2","grunt-contrib-watch":"~0.5.1","grunt-jquerymanifest":"~0.1.2"},"gitHead":"3c621ded501dbdab9a7a4175fda95c5d7785cd9c","_id":"jquery-formatdatetime@1.1.4","_shasum":"c7dff545c138a888648d874070fb4d036f98bf28","_from":".","_npmVersion":"1.5.0-alpha-1","_npmUser":{"name":"agschwender","email":"adam.gschwender@gmail.com"},"dist":{"shasum":"c7dff545c138a888648d874070fb4d036f98bf28","tarball":"https://registry.npmjs.org/jquery-formatdatetime/-/jquery-formatdatetime-1.1.4.tgz","integrity":"sha512-x4MkRPEJtGyovRPv5RDD9lSjWt0pQYFkVpyR7N8pN/q0BFTyYgO4VYfKH+OM0lhtRr1sWu7pyTh55Ky9v9C2vQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDN7wMdLmtwXA6qjAyuIOA5Ra7SUInKMQ5SHRttKYoAyQIhANeArVtVnUGkaB8GH4QRlMt187J4fol4qtMYZgkytJ0F"}]}},"1.1.5":{"name":"jquery-formatdatetime","title":"jQuery Format Date/Time","description":"A jQuery plugin that converts a date object to a supplied format. It was forked from the jQuery UI DatePicker module to support time formatting as well as the original date formatting.","keywords":["format","date","time","datetime"],"version":"1.1.5","author":{"name":"Adam Gschwender","email":"adam.gschwender@gmail.com","url":"http://gschwa.com/"},"maintainers":[{"name":"agschwender","email":"adam.gschwender@gmail.com"}],"licenses":[{"type":"MIT","url":"https://github.com/agschwender/jquery.formatDateTime/blob/master/MIT-LICENSE.txt"},{"type":"GPLv2","url":"https://github.com/agschwender/jquery.formatDateTime/blob/master/GPL-LICENSE.txt"}],"bugs":{"url":"https://github.com/agschwender/jquery.formatDateTime/issues"},"homepage":"https://github.com/agschwender/jquery.formatDateTime","docs":"https://github.com/agschwender/jquery.formatDateTime/blob/master/README.md","download":"https://github.com/agschwender/jquery.formatDateTime/archive/master.zip","repository":{"type":"git","url":"git://github.com/agschwender/jquery.formatDateTime.git"},"main":"jquery.formatDateTime","files":["jquery.formatDateTime.js","README.md"],"engines":{"node":">=0.8"},"scripts":{"test":"grunt test --verbose"},"devDependencies":{"grunt":"~0.4.1","grunt-contrib-concat":"~0.3.0","grunt-contrib-jasmine":"~0.5.1","grunt-contrib-jshint":"~0.6.2","grunt-contrib-uglify":"~0.2.2","grunt-contrib-watch":"~0.5.1","grunt-jquerymanifest":"~0.1.2"},"gitHead":"d40bf5c31e72207eceebd6a6cfc92f93b97cf970","_id":"jquery-formatdatetime@1.1.5","_shasum":"88aa0b2b0ccaf22f92d07eaa8de7a15691b6e24d","_from":".","_npmVersion":"1.4.27","_npmUser":{"name":"agschwender","email":"adam.gschwender@gmail.com"},"dist":{"shasum":"88aa0b2b0ccaf22f92d07eaa8de7a15691b6e24d","tarball":"https://registry.npmjs.org/jquery-formatdatetime/-/jquery-formatdatetime-1.1.5.tgz","integrity":"sha512-4PtbD9OjCo4NO1xP4OMRoZ71ScioDOgGMqxJVjQA4CdCl1QM5CJGnyhlpCE5B1jb9KZNm93HkEHePcleciDwkA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAeK0YQqOmIJvvPrAl080ZhcyCRvq60F2jzhjGhNSCgcAiEA+RODENcfO5d8AqIJFSK/E4pgs7HbHRdNkJCkYmEnLT0="}]}},"1.1.6":{"name":"jquery-formatdatetime","title":"jQuery Format Date/Time","description":"A jQuery plugin that converts a date object to a supplied format. It was forked from the jQuery UI DatePicker module to support time formatting as well as the original date formatting.","keywords":["format","date","time","datetime"],"version":"1.1.6","author":{"name":"Adam Gschwender","email":"adam.gschwender@gmail.com","url":"http://gschwa.com/"},"maintainers":[{"name":"agschwender","email":"adam.gschwender@gmail.com"}],"licenses":[{"type":"MIT","url":"https://github.com/agschwender/jquery.formatDateTime/blob/master/MIT-LICENSE.txt"},{"type":"GPLv2","url":"https://github.com/agschwender/jquery.formatDateTime/blob/master/GPL-LICENSE.txt"}],"bugs":{"url":"https://github.com/agschwender/jquery.formatDateTime/issues"},"homepage":"https://github.com/agschwender/jquery.formatDateTime","docs":"https://github.com/agschwender/jquery.formatDateTime/blob/master/README.md","download":"https://github.com/agschwender/jquery.formatDateTime/archive/master.zip","repository":{"type":"git","url":"git://github.com/agschwender/jquery.formatDateTime.git"},"main":"jquery.formatDateTime","files":["jquery.formatDateTime.js","README.md"],"engines":{"node":">=0.8"},"scripts":{"test":"grunt test --verbose"},"devDependencies":{"grunt":"~0.4.1","grunt-contrib-concat":"~0.3.0","grunt-contrib-jasmine":"~0.5.1","grunt-contrib-jshint":"~0.6.2","grunt-contrib-uglify":"~0.2.2","grunt-contrib-watch":"~0.5.1","grunt-jquerymanifest":"~0.1.2"},"gitHead":"be5505f97d4a06eff2237dff0346455629374d93","_id":"jquery-formatdatetime@1.1.6","_shasum":"e3f2832e510ef881124c664d9d1196cf6659926c","_from":".","_npmVersion":"1.4.27","_npmUser":{"name":"agschwender","email":"adam.gschwender@gmail.com"},"dist":{"shasum":"e3f2832e510ef881124c664d9d1196cf6659926c","tarball":"https://registry.npmjs.org/jquery-formatdatetime/-/jquery-formatdatetime-1.1.6.tgz","integrity":"sha512-1ieAmXEo5OA3zzEbI79XqQc3eEJOZG923L3PVae2w+I7X1iNSSf/k41lB5HfqfVHzn/7OUYnbSNt1Gms+eIcVA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDYE5jYMSmJ3AnNKFTxiWr+D+IIjQn5cP9Iv/8wQ4S8GwIhAJ+UCFwxS6Hzy/zBZWzN051ukl/6SUGQgyg6u04W9Rag"}]}}},"readme":"jQuery formatDateTime Plugin [![Build Status](https://travis-ci.org/agschwender/jquery.formatDateTime.png)](https://travis-ci.org/agschwender/jquery.formatDateTime)\n============================\n\nA jQuery plugin that converts a date object to a supplied format. It was forked from the [jQuery UI DatePicker module](https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.datepicker.js) to support time formatting as well as the original date formatting.\n\nRefer to the `dist` directory for versions of the library which can be used directly in your application.\n\nFormats\n=======\n\nThe plugin supports the following formatting combinations:\n\n    a  - ante meridiem and post meridiem\n    d  - day of month (no leading zero)\n    dd - day of month (two digit)\n    o  - day of year (no leading zeros)\n    oo - day of year (three digit)\n    D  - day name short\n    DD - day name long\n    g  - 12-hour hour format of day (no leading zero)\n    gg - 12-hour hour format of day (two digit)\n    h  - 24-hour hour format of day (no leading zero)\n    hh - 24-hour hour format of day (two digit)\n    u  - millisecond of second (no leading zeros)\n    uu - millisecond of second (three digit)\n    i  - minute of hour (no leading zero)\n    ii - minute of hour (two digit)\n    m  - month of year (no leading zero)\n    mm - month of year (two digit)\n    M  - month name short\n    MM - month name long\n    S  - ordinal suffix for the previous unit\n    s  - second of minute (no leading zero)\n    ss - second of minute (two digit)\n    y  - year (two digit)\n    yy - year (four digit)\n    @  - Unix timestamp (ms since 01/01/1970)\n    !  - Windows ticks (100ns since 01/01/0001)\n    '...' - literal text\n    '' - single quote\n\nExamples\n========\n\nCalling the function with a date.\n\n```javascript\n$.formatDateTime('mm/dd/y g:ii a', new Date('2012/07/05 09:55:03')); // 07/05/12 9:55 AM\n$.formatDateTime('mm/dd/y gg:ii:ss.uu a', new Date('2012/01/01 00:00:00.000')); // 01/01/12 12:00:00.000 AM\n```\n\nUsing an element attribute, e.g.\n\n```html\n<span id=\"example\" data-datetime=\"2012/07/05 09:55:03\" />\n```\n\nand calling\n\n```javascript\n$('#example').formatDateTime('mm/dd/y g:ii a');\n```\n\nwill produce\n\n```html\n<span id=\"example\" data-datetime=\"2012/07/05 09:55:03\">07/05/12 9:55 AM</span>\n```\n\nOr you can specify the date format in the `data-dateformat` attribute in the element, e.g.\n\n```html\n<span id=\"example\" data-datetime=\"2012/07/05 09:55:03\" data-dateformat=\"mm/dd/y g:ii a\">07/05/12 9:55 AM</span>\n```\n\nand calling\n\n```javascript\n$('#example').formatDateTime()\n```\n\nwill produce\n\n```html\n<span id=\"example\" data-datetime=\"2012/07/05 09:55:03\" data-dateformat=\"mm/dd/y g:ii a\">07/05/12 9:55 AM</span>\n```\n\nOr it can override the text of an element, e.g.\n\n```html\n<span id=\"example\">2012/07/05 09:55:03</span>\n```\n\nBy calling\n\n```javascript\n$('#example').formatDateTime('mm/dd/y g:ii a');\n```\n\nwill produce\n\n```html\n<span id=\"example\">07/05/12 9:55 AM</span>\n```\n\nSettings\n--------\n\nThe defaults for formatting are all in English and use traditional capitalization, e.g. Monday, AM and August. This may not be appropriate for all applications. To override these defaults on a case-by-case basis, pass settings to `formatDateTime`, e.g.\n\n```javascript\n$.formatDateTime('mm/dd/y g:ii a', new Date('2012/07/05 09:55:03'), {ampmNames: ['am', 'pm']}); // 07/05/12 9:55 am\n```\n\nTo permanently change the plugin defaults for your application, redefine them directly, e.g.\n\n```javascript\n$.formatDateTime.defaults['ampmNames'] = ['am', 'pm'];\n$.formatDateTime('mm/dd/y g:ii a', new Date('2012/07/05 09:55:03')); // 07/05/12 9:55 am\n```\n\nAvailable settings are as follows:\n\n  * `monthNames`: names of the months, e.g. January\n  * `monthNamesShort`: shortened names of the months, e.g. Jan\n  * `dayNames`: names of the days, e.g. Sunday\n  * `dayNamesShort`: shortened names of the days, e.g. Sun\n  * `ampmNames`: names of the 12-hour clock periods, e.g. AM\n  * `getSuffix`: callback to convert number to ordinal suffix, e.g. 1 to st\n  * `attribute`: attribute which contains the datetime\n  * `formatAttribute`: attribute which contains the datetime format\n\nContributing\n============\n\nThis project is managed using [grunt](http://gruntjs.com/). To initialize the project, run\n\n    $ npm install -g grunt-cli\n\nOnce initialized, run\n\n    $ grunt\n\nThis will run all the tasks needed for building and testing the library. It will produce deployable versions of the library in the `dist` directory. For convenience to users who may not want to build the application, they are also included in the repository and should be included as part of any commits back to the repository.\n\nTesting\n=======\n\nTests are run using [Jasmine](http://pivotal.github.io/jasmine/) via the [grunt jasmine plugin](https://github.com/gruntjs/grunt-contrib-jasmine). They can be run once your environment has been set up (see [Contributing](#contributing) for more details) by issuing\n\n    $ grunt test\n\nThis will perform all tests of the library against jQuery versions 1.5 to 2.1.\n\nLicense\n=======\n\nCopyright (c) 2012 Adam Gschwender\nLicensed under the MIT, GPL licenses.\n","maintainers":[{"name":"agschwender","email":"adam.gschwender@gmail.com"}],"time":{"modified":"2022-06-19T05:03:36.309Z","created":"2014-08-25T21:24:16.228Z","1.1.4":"2014-08-25T21:24:16.228Z","1.1.5":"2015-02-26T19:14:07.647Z","1.1.6":"2015-03-08T17:42:22.204Z"},"homepage":"https://github.com/agschwender/jquery.formatDateTime","keywords":["format","date","time","datetime"],"repository":{"type":"git","url":"git://github.com/agschwender/jquery.formatDateTime.git"},"author":{"name":"Adam Gschwender","email":"adam.gschwender@gmail.com","url":"http://gschwa.com/"},"bugs":{"url":"https://github.com/agschwender/jquery.formatDateTime/issues"},"readmeFilename":"README.md"}