Sha256: fc2e7e44bd53ca90ef47f389c18b57d43bc26104c537681b803569b5e93d9248
Contents?: true
Size: 417 Bytes
Versions: 61
Compression:
Stored size: 417 Bytes
Contents
require 'date' require 'time' # Monkey-patched conversions to Date and DateTime class Time def lformat(format = :default, locale=nil) locale ||= Spider.locale Spider::I18n.localize(locale, self, format) end def to_date ::Date.new(year, month, day) end def to_datetime ::DateTime.civil(year, month, day, hour, min, sec, Rational(utc_offset, 86400)) end end
Version data entries
61 entries across 61 versions & 1 rubygems