Skip to content

Commit 9cf3bed

Browse files
committed
Add reference as option for converting from Date
1 parent 09d895f commit 9cf3bed

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/ice_cube/time_util.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def self.match_zone(input_time, reference)
5858
end
5959

6060
# Ensure that this is either nil, or a time
61-
def self.ensure_time(time, date_eod = false)
61+
def self.ensure_time(time, reference = nil, date_eod = false)
6262
case time
6363
when DateTime
6464
warn "IceCube: DateTime support is deprecated (please use Time) at: #{ caller[2] }"

lib/ice_cube/validations/until.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def until_time
1111
deprecated_alias :until_date, :until_time
1212

1313
def until(time)
14-
time = TimeUtil.ensure_time(time, true)
14+
time = TimeUtil.ensure_time(time, nil, true)
1515
@until = time
1616
replace_validations_for(:until, time.nil? ? nil : [Validation.new(time)])
1717
self

0 commit comments

Comments
 (0)