{"_id":"jquery-dateformat","_rev":"7-0b66e74ac76c2b7ec2fef799c8f7a7a9","name":"jquery-dateformat","description":"It's a jQuery Plugin to format Date outputs using JavaScript.","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.2":{"name":"jquery-dateformat","version":"1.0.2","homepage":"https://github.com/phstc/jquery-dateFormat","description":"It's a jQuery Plugin to format Date outputs using JavaScript.","author":{"name":"Pablo Cantero","email":"pablo@pablocantero.com"},"license":"MIT License GPL","ignore":["**/.*","node_modules","bower_components","test","tests"],"devDependencies":{"grunt":"~0.4.2","grunt-exec":"~0.4","grunt-contrib-jasmine":"~0.3","grunt-contrib-watch":"~0.2","grunt-contrib-jshint":"~0.7","grunt-contrib-uglify":"git://github.com/jharding/grunt-contrib-uglify.git#support-enclose-option","grunt-contrib-concat":"~0.1","grunt-template-jasmine-istanbul":"~0.2.5"},"scripts":{"test":"grunt test --verbose"},"gitHead":"4be651cc434f30cc244c5fa2c65f9c6d1828f3d0","_id":"jquery-dateformat@1.0.2","_shasum":"47eb619e914515fd543ecf84d90f61f2f8616747","_from":".","_npmVersion":"3.7.3","_nodeVersion":"5.9.1","_npmUser":{"name":"phstc","email":"pablo@pablocantero.com"},"dist":{"shasum":"47eb619e914515fd543ecf84d90f61f2f8616747","tarball":"https://registry.npmjs.org/jquery-dateformat/-/jquery-dateformat-1.0.2.tgz","integrity":"sha512-hFpWAQDFUvoaYHbTc1+CAHiJg27nxNvLRwiFJvlFSS40EjfFmz3Nbg6dLhj0YAAlxUexxuUdlp+0ahL8l1mMzQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDer2uhIRcURjh4jxViz7sKlGaWWJx5RjolSlBCJ2zmxwIhANYZrI1zuwkufaS5YH8HtQStOI8NvIXFOb2rC3Tvp0V2"}]},"maintainers":[{"name":"phstc","email":"pablo@pablocantero.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/jquery-dateformat-1.0.2.tgz_1462489369904_0.9186454752925783"},"directories":{}},"1.0.3":{"name":"jquery-dateformat","version":"1.0.3","homepage":"https://github.com/phstc/jquery-dateFormat","description":"It's a jQuery Plugin to format Date outputs using JavaScript.","author":{"name":"Pablo Cantero","email":"pablo@pablocantero.com"},"license":"MIT License GPL","ignore":["**/.*","node_modules","bower_components","test","tests"],"devDependencies":{"grunt":"~0.4.2","grunt-exec":"~0.4","grunt-contrib-jasmine":"~0.3","grunt-contrib-watch":"~0.2","grunt-contrib-jshint":"~0.7","grunt-contrib-uglify":"git://github.com/jharding/grunt-contrib-uglify.git#support-enclose-option","grunt-contrib-concat":"~0.1","grunt-template-jasmine-istanbul":"~0.2.5"},"scripts":{"test":"grunt test --verbose"},"gitHead":"69c31c80ad158cdf48a9c911947b7c22af593f9f","_id":"jquery-dateformat@1.0.3","_shasum":"31f21dac18e8b921e5c9b12de0be80128bd9b77e","_from":".","_npmVersion":"3.7.3","_nodeVersion":"5.9.1","_npmUser":{"name":"phstc","email":"pablo@pablocantero.com"},"dist":{"shasum":"31f21dac18e8b921e5c9b12de0be80128bd9b77e","tarball":"https://registry.npmjs.org/jquery-dateformat/-/jquery-dateformat-1.0.3.tgz","integrity":"sha512-WO4X5OOU8rnhLt0HM78goYHJwdEShUDVGucTLQbJqAugdJsz0uhkZj8yit6WB1U6nMDniJHDtV3OMOE/2mPF2g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID9S44lKVmLvDlWNTmBjOleYd1e2P06Np2licimvNcgAAiEAvQ37nGUu/O5IIf+CKKqHGwWdH3o7Sa8Xo/hySAldMe0="}]},"maintainers":[{"name":"phstc","email":"pablo@pablocantero.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/jquery-dateformat-1.0.3.tgz_1462540954219_0.8745632194913924"},"directories":{}},"1.0.4":{"name":"jquery-dateformat","version":"1.0.4","homepage":"https://github.com/phstc/jquery-dateFormat","description":"It's a jQuery Plugin to format Date outputs using JavaScript.","author":{"name":"Pablo Cantero","email":"pablo@pablocantero.com"},"license":"MIT License","ignore":["**/.*","node_modules","bower_components","test","tests"],"devDependencies":{"grunt-cli":"~1.3.2","grunt":"~0.4.2","grunt-contrib-concat":"~0.1","grunt-contrib-jasmine":"~1.0.3","grunt-contrib-jshint":"~0.7","grunt-contrib-watch":"~0.2","grunt-exec":"~0.4","grunt-template-jasmine-istanbul":"~0.4.0","hoek":"~> 5.0.3"},"scripts":{"test":"grunt test","test:browser":"grunt test:browser","compile":"grunt compile"},"dependencies":{"grunt-contrib-uglify":"^3.3.0"},"gitHead":"d141a23fee3367f7b844e4bda9d50bf3b89bfb0c","_id":"jquery-dateformat@1.0.4","_nodeVersion":"8.14.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-0UhSI9ju0B+ahr/4zy6o9sjn/MxzUnUOEYU1ixNF0HiyO6lJhnKT0LwTZ5BR8a72ZXEa9vgeM1hkjEaMLk4iFQ==","shasum":"c6ccc22d3d46f7ede2159712573f696a0419f479","tarball":"https://registry.npmjs.org/jquery-dateformat/-/jquery-dateformat-1.0.4.tgz","fileCount":20,"unpackedSize":174450,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdQurXCRA9TVsSAnZWagAAlQIP/2FJYRrhUobtO3y1LzQO\nGMR2Q7WsQ4GxxoA9QGFT+o5yhyAkS1LJrAQ6igL5/JNeEEpwJ0d9tka+s98R\n3s+29/fyhnaZGvO5TWnxDR38ExvvIz/lWKYdUE8PPrl7I+wcsG8rHAKMn1P9\nxrGc5xOI5aXBgLFEKN+Vx/5sX89rTOSa2I9tMcRS+rsNJQvNdbWVkf9M03Zx\nwZoW5Pw7FeO7r94gqhB9oc8CWL6d2Cgi8bjRkduVquapkZMZEdSru7WIj/AV\ndgxyOXnKcb8eUdMEjP28AwoojBmOctQZUT1N5R4f35ohZb7v0e6+avRmM6Sl\nhYLKh/cMN0aPVkmgFF48T6wSOgWLpvL4umoJTFz6bpc4ezuzkqDLV69Tp6L4\nvoqBP9jAcNoWb0jpoQbi9g9Q9DX/ZrrXmeeykyC806ibDhskXxTom8/Y85P9\nH1RnzYJegAHa45L27SqFthUIs1y9gimpHRFXm+Wj3qMB10Hgf15IZO9r+QHp\nqvk6GWDHMJwRlYlRg3WEEX/abXpW6TyuPv68EYaI2a1u35PGbZFg4Lpal+CY\nqPkJkNbGnWAokw8vqKFiM04sDazyDQbIrOrK86nX1t6dzB/tPVPpQLnuLbEs\n4V5vHnuv+a+B63n/G1KSd5BjrJK2oQrnys7YUiOTJAKVyGKURCZPrjtxxpff\n3Bek\r\n=kD8K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBgM4aFxd3n453Ff2CTCW9tUJ/snVnHDIwcuIKw8VZjvAiEAzKx82lnCWvdTzgtp8psjuXSXgksOFDGcZ9thOZygbuY="}]},"maintainers":[{"name":"phstc","email":"pablo@pablocantero.com"}],"_npmUser":{"name":"phstc","email":"pablo@pablocantero.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jquery-dateformat_1.0.4_1564666582674_0.3522990545323532"},"_hasShrinkwrap":false}},"readme":"jquery-dateFormat - jQuery Plugin to format Date outputs using JavaScript - ***Having less than 5kb, jquery-dateFormat is the smallest date format library available!***\n\n[![build passing](https://travis-ci.org/phstc/jquery-dateFormat.png \"build passing\")](http://travis-ci.org/phstc/jquery-dateFormat)\n\n# Installation\n\nDownload latest jquery.dateFormat.js or jquery.dateFormat.min.js.\n\n* [jquery-dateFormat.js](https://raw.githubusercontent.com/phstc/jquery-dateFormat/master/dist/jquery-dateformat.js)\n* [jquery-dateFormat.min.js](https://raw.githubusercontent.com/phstc/jquery-dateFormat/master/dist/jquery-dateformat.min.js)\n* [dateFormat.js](https://raw.github.com/phstc/jquery-dateFormat/master/dist/dateFormat.js) (pure Javascript, no jQuery dependency)\n* [dateFormat.min.js](https://raw.github.com/phstc/jquery-dateFormat/master/dist/dateFormat.min.js) (pure Javascript, no jQuery dependency)\n\nYou can use **jquery-dateFormat without jQuery**. You just need to import the dateFormat.js above and instead of formatting with `$.format(...)` you should use `DateFormat.format(...)`.\n\nIf you use **jQuery Validate** plugin you must use jquery-dateFormat without jQuery.\n\n# Format patterns\n\nThe patterns to formatting are based on [java.text.SimpleDateFormat](http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html).\n\n## Date and time patterns\n\n* yy = short year\n* yyyy = long year\n* M = month (1-12)\n* MM = month (01-12)\n* MMM = month abbreviation (Jan, Feb ... Dec)\n* MMMM = long month (January, February ... December)\n* d = day (1 - 31)\n* dd = day (01 - 31)\n* ddd = day of the week in words (Monday, Tuesday ... Sunday)\n* E = short day of the week in words (Mon, Tue ... Sun)\n* D - Ordinal day (1st, 2nd, 3rd, 21st, 22nd, 23rd, 31st, 4th...)\n* h = hour in am/pm (0-12)\n* hh = hour in am/pm (00-12)\n* H = hour in day (0-23)\n* HH = hour in day (00-23)\n* mm = minute\n* ss = second\n* SSS = milliseconds\n* a = AM/PM marker\n* p = a.m./p.m. marker\n\n# Expected input dates formats\n\n* 1982-10-15T01:10:20+02:00\n* 1982-10-15T01:10:20Z\n* Thu Oct 15 01:10:20 CET 1982\n* 1982-10-15 01:10:20.546\n* Thu Oct 15 1982 01:10:20 GMT-0800 (PST)\n* Thu Oct 15 1982 01:10:20 GMT+0800 (China Standard Time)\n* Thu Oct 15 1982 01:10:20 GMT+0200 (W. Europe Daylight Time)\n* 1982-10-15CET01:10:20\n* JavaScript: new Date().getTime()\n\n[Some examples](https://github.com/phstc/jquery-dateFormat/blob/master/test/format_parse_date_spec.js).\n\n# Usage\n\n```javascript\n <script>\n   document.write($.format.date(\"2009-12-18 10:54:50.546\", \"Test: dd/MM/yyyy\"));\n   document.write($.format.date(\"Wed Jan 13 10:43:41 CET 2010\", \"dd~MM~yyyy\"));\n </script>\n```\n\n**Output**\n\n```\n => Test: 18/12/2009\n => 13~01~2010\n```\n\n## Formatting using css classes\n\n```html\n  <span class=\"shortDateFormat\">2009-12-18 10:54:50.546</span>\n  <span class=\"longDateFormat\">2009-12-18 10:54:50.546</span>\n```\n\n```javascript\n  jQuery(function() {\n      var shortDateFormat = 'dd/MM/yyyy';\n      var longDateFormat  = 'dd/MM/yyyy HH:mm:ss';\n\n      jQuery(\".shortDateFormat\").each(function (idx, elem) {\n          if (jQuery(elem).is(\":input\")) {\n              jQuery(elem).val(jQuery.format.date(jQuery(elem).val(), shortDateFormat));\n          } else {\n              jQuery(elem).text(jQuery.format.date(jQuery(elem).text(), shortDateFormat));\n          }\n      });\n      jQuery(\".longDateFormat\").each(function (idx, elem) {\n          if (jQuery(elem).is(\":input\")) {\n              jQuery(elem).val(jQuery.format.date(jQuery(elem).val(), longDateFormat));\n          } else {\n              jQuery(elem).text(jQuery.format.date(jQuery(elem).text(), longDateFormat));\n          }\n      });\n  });\n```\n**Output**\n\n```\n => 18/12/2009\n => 18/12/2009 10:54:50\n```\n\n## Pretty date formatting\n\n`jQuery.format.prettyDate(value)` returns a string representing how long ago the date represents\n\n* value = String representing ISO time or date in milliseconds or javascript Date object\n```javascript\n jQuery.format.prettyDate(new Date())             // => \"just now\"\n jQuery.format.prettyDate(new Date().getTime())   // => \"just now\"\n jQuery.format.prettyDate(\"2008-01-28T20:24:17Z\") // => \"2 hours ago\"\n jQuery.format.prettyDate(\"2008-01-27T22:24:17Z\") // => \"Yesterday\"\n jQuery.format.prettyDate(\"2008-01-26T22:24:17Z\") // => \"2 days ago\"\n jQuery.format.prettyDate(\"2008-01-14T22:24:17Z\") // => \"2 weeks ago\"\n jQuery.format.prettyDate(\"2007-12-15T22:24:17Z\") // => \"more than 5 weeks ago\"\n```\n\n## toBrowserTimeZone\n\n`jQuery.format.toBrowserTimeZone(value, format)` converts into browsers timezone.\n\n* value = String representing date in ISO time (\"2013-09-14T23:22:33Z\") or String representing default JAXB formatting of `java.util.Date` (\"2013-09-14T16:22:33.527-07:00\") or String representing Unix Timestamp (Sat Sep 14 2013 16:22:33 GMT-0700 (PDT)) or javascript date object.\n* format = All input formats valid for `jQuery.format.date` are valid for this method. The defaut format is MM/dd/yyyy HH:mm:ss.\n\n### Valid input formats\n\n```javascript\n var date1 = \"2013-09-14T23:22:33Z\";\n var date2 = \"2013-09-14T16:22:33.527-07:00\";\n var date3 = \"Sat Sep 14 2013 16:22:33 GMT-0700 (PDT)\";\n\n $.format.toBrowserTimeZone(date1)\n $.format.toBrowserTimeZone(date2)\n $.format.toBrowserTimeZone(date3)\n```\n\n# Development\n\nTo compile jquery-dateFormat (generate dist files):\n\n```sh\nnpm run compile\n```\n\n## Testing\n\nTests are written using Jasmine. To run the test suite with PhantomJS, run `npm run test`. To run the test suite in your default browser, run `npm run test:browser`.\n\n# Licenses\n\njquery-dateFormat is released under the [MIT License](http://opensource.org/licenses/MIT).\n\n# Do you want to improve jquery-dateFormat\n\nYou're welcome to make your contributions and send them as a pull request.\n\n## Contributors\n\nThanks to [all contributors](https://github.com/phstc/jquery-dateFormat/graphs/contributors).\n","maintainers":[{"name":"phstc","email":"pablo@pablocantero.com"}],"time":{"modified":"2022-06-19T05:01:21.282Z","created":"2016-05-05T23:02:53.504Z","1.0.2":"2016-05-05T23:02:53.504Z","1.0.3":"2016-05-06T13:22:36.952Z","1.0.4":"2019-08-01T13:36:22.773Z"},"homepage":"https://github.com/phstc/jquery-dateFormat","author":{"name":"Pablo Cantero","email":"pablo@pablocantero.com"},"license":"MIT License","readmeFilename":"README.md","users":{"fbnlsr":true}}