Sha256: 98684a6115c196e21fa1fe916ccd070ac99783284d341b52a1fe68336f176db7
Contents?: true
Size: 564 Bytes
Versions: 7
Compression:
Stored size: 564 Bytes
Contents
# encoding: UTF-8 # Copyright 2012 Twitter, Inc # http://www.apache.org/licenses/LICENSE-2.0 module TwitterCldr module Localized class LocalizedTime < LocalizedDateTime def to_datetime(date) date_obj = date.is_a?(LocalizedDate) ? date.base_obj : date LocalizedDateTime.new(DateTime.parse("#{date_obj.strftime("%Y-%m-%d")}T#{@base_obj.strftime("%H:%M:%S%z")}"), @locale, :calendar_type => @calendar_type) end protected def formatter_const TwitterCldr::Formatters::TimeFormatter end end end end
Version data entries
7 entries across 7 versions & 1 rubygems