Module: DateValidation
- Defined in:
- lib/date_validation.rb,
lib/date_validation/version.rb
Constant Summary collapse
- VERSION =
"0.0.1"
Class Method Summary collapse
Class Method Details
.date(l) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/date_validation.rb', line 8 def self.date(l) err=Array.new(){Array.new()} err[0]=l.split("-") x=test_date(err[0][0].to_i,err[0][1].to_i,err[0][2].to_i) if x puts "correct date" else puts "invalid date" end end |