Sha256: 879bc7985a8db3de3873c9cbbcb2f9ab3ef36ce15880f938d461b913c157a626

Contents?: true

Size: 317 Bytes

Versions: 1

Compression:

Stored size: 317 Bytes

Contents

module Ecircle
  module Helper
    extend self

    # @private
    def date_format date
      tz = date.strftime('%z')
      matcher = /(.*)(00)/.match(tz) # We need to do that because ecircle won't accept +0200, just +02:00.
      "#{date.strftime('%Y-%m-%dT%H:%M:%S')}#{matcher[1]}:#{matcher[2]}"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ecircle-0.0.7 lib/ecircle/helper.rb