class Date

Date code pulled and adapted from: Ruby Cookbook by Lucas Carlson and Leonard Richardson Published by O'Reilly ISBN: 0-596-52369-6

Public Instance Methods

feed_utils_to_gm_time() click to toggle source
# File lib/feedjira/core_ext/date.rb, line 6
def feed_utils_to_gm_time
  feed_utils_to_time(new_offset, :gm)
end
feed_utils_to_local_time() click to toggle source
# File lib/feedjira/core_ext/date.rb, line 10
def feed_utils_to_local_time
  feed_utils_to_time(new_offset(DateTime.now.offset-offset), :local)
end

Private Instance Methods

feed_utils_to_time(dest, method) click to toggle source
# File lib/feedjira/core_ext/date.rb, line 15
def feed_utils_to_time(dest, method)
  Time.send(method, dest.year, dest.month, dest.day, dest.hour, dest.min,
            dest.sec, dest.zone)
end