lib/coolkit/time.rb in coolkit-0.2.0 vs lib/coolkit/time.rb in coolkit-0.2.1
- old
+ new
@@ -1,11 +1,11 @@
require "time"
module Coolkit
# Convert a `UTC` {Time} object to `EST`.
#
- # @raise [ArgumentError] Unless passed a `UTC` formatted time.
# @param time [Time]
+ # @raise [ArgumentError] Unless passed a `UTC` formatted Time object.
# @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