Class: Date
- Inherits:
-
Object
- Object
- Date
- Defined in:
- lib/date_ext.rb
Overview
To change this template, choose Tools | Templates and open the template in the editor.
Class Method Summary collapse
Class Method Details
.from_scratches(s, name, model = :range) ⇒ Object
5 6 7 8 9 |
# File 'lib/date_ext.rb', line 5 def self.from_scratches(s, name, model = :range) return nil if s.nil? return nil if s[model].nil? self.civil(s[model][:"#{name}(1i)"].to_i,s[model][:"#{name}(2i)"].to_i,s[model][:"#{name}(3i)"].to_i) end |