Method: Date#clone

Defined in:
lib/spiderfw/utils/monkey/date_time.rb

#cloneObject

Custom clone for home_run gem



32
33
34
35
36
37
38
# File 'lib/spiderfw/utils/monkey/date_time.rb', line 32

def clone
    if self.respond_to?(:hour)
        self.class.civil(self.year, self.month, self.day, self.hour, self.min, self.sec, self.offset)
    else
        self.class.civil(self.year, self.month, self.day)
    end
end