{"_id":"update-year","_rev":"106711","name":"update-year","description":"Update or add the current year to a range of years in a string.","dist-tags":{"latest":"0.5.2"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-03T10:38:43.000Z","created":"2014-12-01T12:33:15.663Z","0.5.2":"2016-01-19T12:51:57.027Z","0.5.1":"2016-01-19T12:30:19.707Z","0.5.0":"2015-02-01T13:06:16.506Z","0.4.0":"2015-02-01T13:00:22.001Z","0.3.0":"2015-02-01T12:40:14.936Z","0.1.0":"2014-12-01T12:33:15.663Z"},"users":{},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/update-year.git"},"versions":{"0.5.2":{"name":"update-year","description":"Update or add the current year to a range of years in a string.","version":"0.5.2","homepage":"https://github.com/jonschlinkert/update-year","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/update-year.git"},"bugs":{"url":"https://github.com/jonschlinkert/update-year/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"array-unique":"^0.2.1","year":"^0.2.1"},"devDependencies":{"gulp-format-md":"^0.1.5","mocha":"*","should":"*"},"keywords":["parse","update","year"],"verb":{"related":{"list":["month","update-copyright","year"]},"plugins":["gulp-format-md"],"layout":"default"},"gitHead":"231f8e73bf554f58a99e0965f05bc06406d21f76","_id":"update-year@0.5.2","_shasum":"b45bc3e20960bd46b1eae26ec3712e6c0449fae1","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.3.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"b45bc3e20960bd46b1eae26ec3712e6c0449fae1","size":2820,"noattachment":false,"key":"/update-year/-/update-year-0.5.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/update-year/download/update-year-0.5.2.tgz"},"directories":{},"publish_time":1453207917027,"_cnpm_publish_time":1453207917027,"_hasShrinkwrap":false},"0.5.1":{"name":"update-year","description":"Update or add the current year to a range of years in a string.","version":"0.5.1","homepage":"https://github.com/jonschlinkert/update-year","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/update-year.git"},"bugs":{"url":"https://github.com/jonschlinkert/update-year/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"year":"^0.2.1"},"devDependencies":{"gulp-format-md":"^0.1.5","mocha":"*","should":"*"},"keywords":["parse","update","year"],"verb":{"related":{"list":["month","update-copyright","year"]},"plugins":["gulp-format-md"],"layout":"default"},"gitHead":"b104a2d19fce52aedf8011c8a1810aa8ac64a075","_id":"update-year@0.5.1","_shasum":"401feacad64f976e07cb7638afbf6dcfc47e017b","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.3.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"401feacad64f976e07cb7638afbf6dcfc47e017b","size":2720,"noattachment":false,"key":"/update-year/-/update-year-0.5.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/update-year/download/update-year-0.5.1.tgz"},"directories":{},"publish_time":1453206619707,"_cnpm_publish_time":1453206619707,"_hasShrinkwrap":false},"0.5.0":{"name":"update-year","description":"Update a year or range of years in a string.","version":"0.5.0","homepage":"https://github.com/jonschlinkert/update-year","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/update-year.git"},"bugs":{"url":"https://github.com/jonschlinkert/update-year/issues"},"license":{"type":"MIT","url":"https://github.com/jonschlinkert/update-year/blob/master/LICENSE-MIT"},"main":"index.js","files":["index.js"],"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"dependencies":{"array-unique":"^0.1.1","year":"^0.2.1"},"devDependencies":{"mocha":"*","should":"*"},"keywords":["parse","update","year"],"gitHead":"c951c0321905370ff71bf79188337e6c6b743004","_id":"update-year@0.5.0","_shasum":"1c892e5179d955f91bb2f2487e1e0c63073472ee","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"1c892e5179d955f91bb2f2487e1e0c63073472ee","size":1681,"noattachment":false,"key":"/update-year/-/update-year-0.5.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/update-year/download/update-year-0.5.0.tgz"},"directories":{},"publish_time":1422795976506,"_cnpm_publish_time":1422795976506,"_hasShrinkwrap":false},"0.4.0":{"name":"update-year","description":"Update a year or range of years in a string.","version":"0.4.0","homepage":"https://github.com/jonschlinkert/update-year","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/update-year.git"},"bugs":{"url":"https://github.com/jonschlinkert/update-year/issues"},"license":{"type":"MIT","url":"https://github.com/jonschlinkert/update-year/blob/master/LICENSE-MIT"},"main":"index.js","files":["index.js"],"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"dependencies":{"array-unique":"^0.1.1","year":"^0.2.1"},"devDependencies":{"mocha":"*","should":"*"},"keywords":["parse","update","year"],"gitHead":"c951c0321905370ff71bf79188337e6c6b743004","_id":"update-year@0.4.0","_shasum":"0f3fdc4fe9b82e742039c7cc376cf7de675d9d93","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"0f3fdc4fe9b82e742039c7cc376cf7de675d9d93","size":1599,"noattachment":false,"key":"/update-year/-/update-year-0.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/update-year/download/update-year-0.4.0.tgz"},"directories":{},"publish_time":1422795622001,"_cnpm_publish_time":1422795622001,"_hasShrinkwrap":false},"0.3.0":{"name":"update-year","description":"Update a year or range of years in a string.","version":"0.3.0","homepage":"https://github.com/jonschlinkert/update-year","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/update-year.git"},"bugs":{"url":"https://github.com/jonschlinkert/update-year/issues"},"license":{"type":"MIT","url":"https://github.com/jonschlinkert/update-year/blob/master/LICENSE-MIT"},"main":"index.js","files":["index.js"],"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"dependencies":{"array-unique":"^0.1.1","year":"^0.2.1"},"devDependencies":{"mocha":"*","should":"*"},"keywords":["parse","update","year"],"gitHead":"d1f351ce7a2a58fbc5ea1c9b71cabbb57e67b6e7","_id":"update-year@0.3.0","_shasum":"495144f81e61c76fb04eab2bc66ad99e40a90025","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"495144f81e61c76fb04eab2bc66ad99e40a90025","size":1587,"noattachment":false,"key":"/update-year/-/update-year-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/update-year/download/update-year-0.3.0.tgz"},"directories":{},"publish_time":1422794414936,"_cnpm_publish_time":1422794414936,"_hasShrinkwrap":false},"0.1.0":{"name":"update-year","description":"Update the year in a string. API and CLI.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/update-year","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/update-year.git"},"bugs":{"url":"https://github.com/jonschlinkert/update-year/issues"},"license":{"type":"MIT","url":"https://github.com/jonschlinkert/update-year/blob/master/LICENSE-MIT"},"main":"index.js","preferGlobal":true,"bin":{"year":"./cli.js"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"dependencies":{"arr":"^0.1.5","extend-shallow":"^0.1.1","look-up":"^0.2.0","minimist":"^1.1.0","verbalize":"^0.1.2","write":"^0.1.1","year":"^0.2.1"},"devDependencies":{"mocha":"*","should":"*"},"keywords":[],"_id":"update-year@0.1.0","_shasum":"6cdfa36c89c8bbe80558fa58f8aa3288677cc9c9","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"6cdfa36c89c8bbe80558fa58f8aa3288677cc9c9","size":3430,"noattachment":false,"key":"/update-year/-/update-year-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/update-year/download/update-year-0.1.0.tgz"},"directories":{},"publish_time":1417437195663,"_cnpm_publish_time":1417437195663,"_hasShrinkwrap":false}},"readme":"# update-year [![NPM version](https://img.shields.io/npm/v/update-year.svg)](https://www.npmjs.com/package/update-year) [![Build Status](https://img.shields.io/travis/jonschlinkert/update-year.svg)](https://travis-ci.org/jonschlinkert/update-year)\n\n> Update or add the current year to a range of years in a string.\n\n- [Install](#install)\n- [Usage](#usage)\n  * [.matchRange](#matchrange)\n- [Related projects](#related-projects)\n- [Running tests](#running-tests)\n- [Contributing](#contributing)\n- [Author](#author)\n- [License](#license)\n\n_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm i update-year --save\n```\n\n## Usage\n\n_(Useful for updating [copyright statements](https://github.com/jonschlinkert/update-copyright), etc.)_\n\nPass a year, or a range of years (e.g. `1999-2012`), and the current year will be appended or the range will be updated with the current year, using the correct syntax.\n\n**Examples**\n\n```js\nvar year = require('update-year');\n\nyear('2016'); //=> '2016'\nyear('2015'); //=> '2015-2016'\nyear('2012'); //=> '2012, 2016'\nyear('2013'); //=> '2013, 2016'\nyear('2014'); //=> '2014, 2016'\nyear('2013, 2015'); //=> '2013, 2015-2016'\nyear('2014-2015'); //=> '2014-2016'\nyear('1999, 2001'); //=> '1999, 2001, 2016'\nyear('1999-2001'); //=> '1999-2001, 2016'\nyear('1999-2001, 2009'); //=> '1999-2001, 2009, 2016'\n```\n\n### .matchRange\n\nMatch a year or year range in a string\n\n```js\nyear.matchRange('foo bar 2009, 2011, 2013-2014 baz');\n//=> '2009, 2011, 2013-2014'\n```\n\n## Related projects\n\n* [month](https://www.npmjs.com/package/month): Get the name or number of the current month or any month of the year. | [homepage](https://github.com/datetime/month)\n* [update-copyright](https://www.npmjs.com/package/update-copyright): Update the copyright statement in a string based on globally stored template and values. | [homepage](https://github.com/jonschlinkert/update-copyright)\n* [year](https://www.npmjs.com/package/year): Simple utility to get the current year with 2 or 4 digits. | [homepage](https://github.com/jonschlinkert/year)\n\n## Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm i -d && npm test\n```\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/update-year/issues/new).\n\n## Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)\n\n## License\n\nCopyright © 2016 [Jon Schlinkert](https://github.com/jonschlinkert)\nReleased under the MIT license.\n\n***\n\n_This file was generated by [verb](https://github.com/verbose/verb) on January 19, 2016._","_attachments":{},"homepage":"https://github.com/jonschlinkert/update-year","bugs":{"url":"https://github.com/jonschlinkert/update-year/issues"},"license":"MIT"}