Sha256: 02af27d12e1c0eb6c84ecff86cda164cf0e263cf2eddcf697353ae97060db351

Contents?: true

Size: 280 Bytes

Versions: 5

Compression:

Stored size: 280 Bytes

Contents

module Kaui
  module DateHelper
    def format_date(date)
      # TODO: make timezone configurable
      parsed_date = DateTime.parse(date).in_time_zone("Pacific Time (US & Canada)")
      parsed_date.to_s(:pretty) + " " + (parsed_date.dst? ? "PDT" : "PST")
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
kaui-0.0.5 app/helpers/kaui/date_helper.rb
kaui-0.0.4 app/helpers/kaui/date_helper.rb
kaui-0.0.3 app/helpers/kaui/date_helper.rb
kaui-0.0.2 app/helpers/kaui/date_helper.rb
kaui-0.0.1 app/helpers/kaui/date_helper.rb