Flowdock
method

determine_time

Importance_0
Ruby latest stable (v1_9_3_392) - 0 notes - Class: FtpFile
determine_time(d1, d2, d3) private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rake/contrib/ftptools.rb, line 57
    def determine_time(d1, d2, d3)
      now = self.class.time.now
      if /:/ =~ d3
        result = Time.parse("#{d1} #{d2} #{now.year} #{d3}")
        if result > now
          result = Time.parse("#{d1} #{d2} #{now.year-1} #{d3}")
        end
      else
        result = Time.parse("#{d1} #{d2} #{d3}")
      end
      result
#       elements = ParseDate.parsedate("#{d1} #{d2} #{d3}")
#       if elements[0].nil?
#         today = self.class.date.today
#         if elements[1] > today.month
#           elements[0] = today.year - 1
#         else
#           elements[0] = today.year
#         end
#       end
#       elements = elements.collect { |el| el.nil? ? 0 : el }
#       Time.mktime(*elements[0,7])
    end
Register or log in to add new notes.