{"_id":"handlebars.moment","_rev":"6-d3d22d6b6398438745bfa0c5ab5d6cbd","name":"handlebars.moment","description":"Handlebars helpers for moment.js","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.0":{"name":"handlebars.moment","description":"Handlebars helpers for moment.js","version":"1.0.0","main":"handlebars.moment.js","repository":{"type":"git","url":"git://github.com/solidgoldpig/handlebars.moment.git#1.0.0"},"homepage":"http://moment.handlebars.solidgoldpig.com","bugs":{"url":"https://github.com/solidgoldpig/handlebars.moment/issues"},"keywords":["handlebars","moment","duration","date","time","format"],"dependencies":{"moment":">0.0.0"},"devDependencies":{"handlebars":">0.0.0","jasmine-node":"^1.14.x","log":"^1.4.0"},"scripts":{"test":"jasmine-node --verbose spec"},"author":{"name":"Alex Robinson","email":"handlebars.moment@alex.solidgoldpig.com"},"license":"UNLICENSE","gitHead":"622c2fb966aa0f0f6c45ae60894262cfd4710024","_id":"handlebars.moment@1.0.0","_shasum":"fe9a9527c3dd59b0bb12b3329f51d579b8d18316","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"solidgoldpig","email":"npm@alex.solidgoldpig.com"},"maintainers":[{"name":"solidgoldpig","email":"npm@alex.solidgoldpig.com"}],"dist":{"shasum":"fe9a9527c3dd59b0bb12b3329f51d579b8d18316","tarball":"https://registry.npmjs.org/handlebars.moment/-/handlebars.moment-1.0.0.tgz","integrity":"sha512-Ob+jjYbeGZkbKzIQJhZ/fVR4WbuDkXMXfkzQjG5ezcIdeeU4cIzW7fWLd0g8Agchh1NuEz356FOpGcKvejXkLQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCs0eJjpakiv4rRTcECqexd+i/Jb3YhYlfGjbktQZQ+vAIhAKAIQVpHkL0mdqy84ugRBMwUbo82d2G4qKp2CiXkDLVZ"}]}},"1.0.1":{"name":"handlebars.moment","description":"Handlebars helpers for moment.js","version":"1.0.1","main":"handlebars.moment.js","repository":{"type":"git","url":"git://github.com/solidgoldpig/handlebars.moment.git#1.0.1"},"homepage":"http://moment.handlebars.solidgoldpig.com","bugs":{"url":"https://github.com/solidgoldpig/handlebars.moment/issues"},"keywords":["handlebars","moment","duration","date","time","format"],"dependencies":{"moment":">0.0.0"},"devDependencies":{"handlebars":">0.0.0","jasmine-node":"^1.14.x","log":"^1.4.0"},"scripts":{"test":"jasmine-node --verbose spec"},"author":{"name":"Alex Robinson","email":"handlebars.moment@alex.solidgoldpig.com"},"license":"UNLICENSE","gitHead":"e483a77a6781d1adaf729d5c972a1ce8d588bac9","_id":"handlebars.moment@1.0.1","_shasum":"2f6d34e2cc1463f812632ff6ec626acd3b332a9f","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"solidgoldpig","email":"npm@alex.solidgoldpig.com"},"maintainers":[{"name":"solidgoldpig","email":"npm@alex.solidgoldpig.com"}],"dist":{"shasum":"2f6d34e2cc1463f812632ff6ec626acd3b332a9f","tarball":"https://registry.npmjs.org/handlebars.moment/-/handlebars.moment-1.0.1.tgz","integrity":"sha512-H+aYKEaxlZhKlEM/CXDlTnEcAplgJabaYFIMXbaATJqFNo9U4NQa+3EijAWeHa8M98yaebF+P2tKH+dsC7e4LQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICSnFDLpyhnILMvz80D+3LhJdT/ztORaKJJLFnj6wU9PAiAMC9PKyVxuTSklewAnYzcAOAkEB9s87YANyVe+aiaRDw=="}]}},"1.0.3":{"name":"handlebars.moment","description":"Handlebars helpers for moment.js","version":"1.0.3","main":"handlebars.moment.js","repository":{"type":"git","url":"git://github.com/solidgoldpig/handlebars.moment.git#1.0.3"},"homepage":"http://moment.handlebars.solidgoldpig.com","bugs":{"url":"https://github.com/solidgoldpig/handlebars.moment/issues"},"keywords":["handlebars","moment","duration","date","time","format"],"dependencies":{"moment":">0.0.0"},"devDependencies":{"handlebars":">0.0.0","jasmine-node":"^1.14.x","log":"^1.4.0"},"scripts":{"test":"./node_modules/jasmine-node/bin/jasmine-node spec","test:output":"npm test -- --verbose --config loglevel info"},"author":{"name":"Alex Robinson","email":"handlebars.moment@alex.solidgoldpig.com"},"license":"UNLICENSE","gitHead":"1dc7c01ad8ba5878958405e3e9975975c7215c66","_id":"handlebars.moment@1.0.3","_shasum":"7215d016082cfc4c5a4e98976536948a211da14f","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"solidgoldpig","email":"npm@alex.solidgoldpig.com"},"maintainers":[{"name":"solidgoldpig","email":"npm@alex.solidgoldpig.com"}],"dist":{"shasum":"7215d016082cfc4c5a4e98976536948a211da14f","tarball":"https://registry.npmjs.org/handlebars.moment/-/handlebars.moment-1.0.3.tgz","integrity":"sha512-PxwM33eZXyzB5JxR3FBns0ZYxSFkQII1tdI3msLmwu+Fi3nEDFFjknRtOc9rqw4RlfxjMoO7qViVdmBRWcugRA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCHPGjEWfNJ5uushlmAiCSGgqFGwhEbHgAovsTajwe3hQIgJCSHwvVCRagvhfDt/DS00M0fyr3TLbzGRo6Dy7WTPMg="}]}},"1.0.4":{"name":"handlebars.moment","description":"Handlebars helpers for moment.js","version":"1.0.4","main":"handlebars.moment.js","repository":{"type":"git","url":"git://github.com/solidgoldpig/handlebars.moment.git#1.0.4"},"homepage":"http://moment.handlebars.solidgoldpig.com","bugs":{"url":"https://github.com/solidgoldpig/handlebars.moment/issues"},"keywords":["handlebars","moment","duration","date","time","format"],"dependencies":{"lodash":">1.0.0","handlebars":">2.0.0","moment":">2.7.0"},"devDependencies":{"jasmine-node":"^1.14.x","log":"^1.4.0"},"scripts":{"test":"./node_modules/jasmine-node/bin/jasmine-node spec","test:output":"npm test -- --verbose --config loglevel info"},"author":{"name":"Alex Robinson","email":"handlebars.moment@alex.solidgoldpig.com"},"license":"UNLICENSE","gitHead":"e8da8f8f9e4368154dd11853b4c6405be11209c1","_id":"handlebars.moment@1.0.4","_shasum":"204ba9591db1fa5d6ea31fde630bdbf827ad1100","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.2","_npmUser":{"name":"solidgoldpig","email":"npm@alex.solidgoldpig.com"},"maintainers":[{"name":"solidgoldpig","email":"npm@alex.solidgoldpig.com"}],"dist":{"shasum":"204ba9591db1fa5d6ea31fde630bdbf827ad1100","tarball":"https://registry.npmjs.org/handlebars.moment/-/handlebars.moment-1.0.4.tgz","integrity":"sha512-1bibhTPzzEn5Ph9FKbFeXtV5rH4/SDhwYInL4F3ZfJUMks65/ZoU1Sjfs0EZaIoJPe2Tl7ymslthb6jv1AlSkA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCMCZitK7zIOV5w63L2DxGss+mBloTcvWnlB6xq3LuRUwIhALNq4nxHKhd5NCaa/lu1T6pKrg/5L+M9KR092y5SkW57"}]}}},"readme":"# handlebars.moment\n\n    {{moment}}\n\nContent helpers providing [Moment.js](http://momentjs.com) functionality for [Handlebars](http://handlebarsjs.com)\n\n### Version\n\n1.0.4\n\n### Installation\n\n    npm install handlebars.moment\n\n### Registering the helpers\n\n    var Handlebars = require(\"handlebars\");\n    var MomentHandler = require(\"handlebars.moment\");\n    MomentHandler.registerHelpers(Handlebars);\n\n### Using the helpers\n\n#### moment\n\nCurrent date\n\n    {{moment}}\n\nSpecific date\n\n    {{moment d}}\n    {{moment date=d}}\n\nDate format\n\n    {{moment d \"YY, MMM dd\"}}\n    {{moment date=d format=\"DD/MM/YYYY\"}}\n    {{moment d unix=true}}\n\nDate input parsing\n\n    {{moment dinput input=\"DD-YYYY-MM\"}}\n\nDate timezone\n\n    {{moment dstr utc=true}}\n    {{moment dstr local=true}}\n\nDate units\n\n    {{moment d \"millisecond\"}}\n    {{moment d \"second\"}}\n    {{moment d \"minute\"}}\n    {{moment d \"hour\"}}\n    {{moment d \"date\"}}\n    {{moment d \"day\"}}\n    {{moment d \"weekday\"}}\n    {{moment d \"weekday\" type=\"s\"}}\n    {{moment d \"weekday\" type=\"xs\"}}\n    {{moment d \"weekday\" type=\"number\"}}\n    {{moment d \"isoweekday\"}}\n    {{moment d \"dayofyear\"}}\n    {{moment d \"week\"}}\n    {{moment d \"isoweek\"}}\n    {{moment d \"month\"}}\n    {{moment d \"year\"}}\n    {{moment d \"weekyear\"}}\n    {{moment d \"isoweekyear\"}}\n\nDate manipulation\n\n    {{moment d add=\"days\" amount=\"7\"}}\n    {{moment d add=\"365\" addparam=\"d\"}}\n    {{moment d subtract=\"days\" amount=\"7\"}}\n    {{moment d subtract=\"365\" subtractparam=\"d\"}}\n\nStart and end of years\n\n    {{moment d startof=\"year\"}}\n    {{moment d endof=\"year\"}}\n\nDate thresholds\n\n    {{moment d max=dmax}}\n    {{moment d min=dmin}}\n\nDate from now and specific dates\n \n    {{moment d \"fromNow\"}}\n    {{moment d \"from\" dfrom}}\n\nDifference between dates\n\n    {{moment d diff=ddiff}}\n\nDate as calendar time\n\n    {{moment d \"calendar\"}}\n\nDate as strings\n    {{moment d \"str\"}}\n    {{moment d \"val\"}}\n    {{moment d \"unix\"}}\n\nMoment utils\n\n    {{moment d \"daysinmonth\"}}\n    {{moment d \"todate\"}}\n    {{moment d \"array\"}}\n    {{moment d \"isostring\"}}\n\n#### duration\n\nDuration - implictly in milliseconds\n\n    {{duration d}}\n\nDuration with explicit input date unit type\n    \n    {{duration d input=\"s\"}}\n\nAmount of date units in duration\n\n    {{duration d \"seconds\"}}\n    {{duration d \"minutes\"}}\n    {{duration d \"years\"}}\n    {{duration d get=\"seconds\"}}\n    {{duration d \"s\"}}\n\nDuration as date units\n\n    {{duration d \"asseconds\"}}\n    {{duration d \"asminutes\"}}\n    {{duration d \"asyears\"}}\n    {{duration d as=\"seconds\"}}\n\nHumanize duration output\n\n    {{duration d \"humanize\"}}\n    {{duration d \"humanize\" true}}\n    {{duration d suffix=true}}\n\nManipulate durations\n\n    {{duration d add=damount as=\"milliseconds\"}}\n    {{duration d subtract=damount as=\"seconds\"}}\n    {{duration d subtract=damount as=\"days\"}}\n\n### Using handlebars.moment in the browser\n\n`handlebars.moment` is written using a [UMD](https://github.com/umdjs/umd) pattern and it’s preferable to load it using a module loader that supports [AMD](http://addyosmani.com/writing-modular-js/) modules (eg. [RequireJS](http://requirejs.org/), [JSPM](http://jspm.io/)). This guarantees that its dependencies have been loaded before it is run.\n\nHowever, if a window element is detected, the function returned by `handlebars.moment` is assigned to `HandlebarsMoment` in the global window context. This function needs to be called with `lodash` and `moment` as its arguments. The resulting object has the  `registerHelpers` which must then be called for `handlebars` to know about the helper.\n\n    HandlebarsMoment(_, moment).registerHelpers(Handlebars);\n\n### Tests\n\n    npm test\n\nTo see output generated by tests\n\n    npm run test:output\n\n### Unlicense\n\nhandlebars.moment is free and unencumbered software released into \nthe public domain.\n\nAnyone is free to copy, modify, publish, use, compile, sell, or\ndistribute this software, either in source code form or as a compiled\nbinary, for any purpose, commercial or non-commercial, and by any\nmeans.\n\nIn jurisdictions that recognize copyright laws, the author or authors\nof this software dedicate any and all copyright interest in the\nsoftware to the public domain. We make this dedication for the benefit\nof the public at large and to the detriment of our heirs and\nsuccessors. We intend this dedication to be an overt act of\nrelinquishment in perpetuity of all present and future rights to this\nsoftware under copyright law.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\nOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nFor more information, please refer to <http://unlicense.org/>","maintainers":[{"name":"solidgoldpig","email":"npm@alex.solidgoldpig.com"}],"time":{"modified":"2022-06-18T18:55:05.475Z","created":"2015-03-24T20:34:35.748Z","1.0.0":"2015-03-24T20:34:35.748Z","1.0.1":"2015-04-03T18:43:54.075Z","1.0.3":"2015-04-03T20:36:12.435Z","1.0.4":"2016-01-07T09:23:20.526Z"},"homepage":"http://moment.handlebars.solidgoldpig.com","keywords":["handlebars","moment","duration","date","time","format"],"repository":{"type":"git","url":"git://github.com/solidgoldpig/handlebars.moment.git#1.0.4"},"author":{"name":"Alex Robinson","email":"handlebars.moment@alex.solidgoldpig.com"},"bugs":{"url":"https://github.com/solidgoldpig/handlebars.moment/issues"},"license":"UNLICENSE","readmeFilename":"README.md"}