Sha256: 7bb8f2fad8fc83c7787318c118ca46329598e279c3788314f5123cb3470b5c21
Contents?: true
Size: 337 Bytes
Versions: 2
Compression:
Stored size: 337 Bytes
Contents
require "time" module Coolkit # Convert a `UTC` {Time} object to `EST`. # # @raise [ArgumentError] Unless passed a `UTC` formatted time. # @param time [Time] # @return [Time] def self.to_est(time) raise ArgumentError "argument is not in UTC format" unless time.utc?() return time + Time.zone_offset("EST") end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
coolkit-0.2.0 | lib/coolkit/time.rb |
coolkit-0.1.0 | lib/coolkit/time.rb |