Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/farski/copyrighter
Conveniently output copyright date ranges
https://github.com/farski/copyrighter
Last synced: about 1 month ago
JSON representation
Conveniently output copyright date ranges
- Host: GitHub
- URL: https://github.com/farski/copyrighter
- Owner: farski
- License: mit
- Created: 2012-01-25T19:42:44.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2015-10-31T16:26:40.000Z (about 9 years ago)
- Last Synced: 2024-11-04T16:52:54.094Z (2 months ago)
- Language: Ruby
- Homepage:
- Size: 114 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Copyrighter
[![Gem Version](http://img.shields.io/gem/v/copyrighter.svg)](https://rubygems.org/gems/copyrighter)
[![Dependency Status](https://gemnasium.com/farski/copyrighter.svg)](https://gemnasium.com/farski/copyrighter)
[![Build Status](https://travis-ci.org/farski/copyrighter.svg)](https://travis-ci.org/farski/copyrighter)
[![Code Climate](https://codeclimate.com/github/farski/copyrighter/badges/gpa.svg)](https://codeclimate.com/github/farski/copyrighter)
[![Coverage Status](https://coveralls.io/repos/farski/copyrighter/badge.svg?branch=master&service=github)](https://coveralls.io/github/farski/copyrighter?branch=master)Handy way to print out copyright dates, like in a footer.
### Examples
The following examples assume it's 2012
© 2012
=> "2012"This will automatically change to "2012 – 2013" next year!
# © will take an integer
© 1999
=> "1999 – 2012"
# or a range
© 1492..1566
=> "1492 – 1566"You can also provide an optional second argument, which will be used to join the string
© 1999, " to "
=> "1999 to 2012"