Module: CopyrightMafa
- Defined in:
- lib/copyright_mafa.rb,
lib/copyright_mafa/version.rb
Constant Summary collapse
- VERSION =
"0.1.0"
Instance Method Summary collapse
Instance Method Details
#copyright(start_year) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/copyright_mafa.rb', line 4 def copyright(start_year) start_year = start_year.to_i current_year = Time.new.year if current_year > start_year && start_year > 2000 "#{start_year} - #{current_year}" elsif start_year > 2000 start_year.to_s else current_year.to_s end end |