chronological 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
@@ -6,10 +6,10 @@ module Chronological
|
|
6
6
|
base_time_field_is_utc = options.has_key? :base_utc
|
7
7
|
time_field_utc_suffix = base_time_field_is_utc ? 'utc' : nil
|
8
8
|
|
9
|
-
start_time_field = ['started_at', time_field_utc_suffix].join('_')
|
10
|
-
end_time_field = ['ended_at', time_field_utc_suffix].join('_')
|
11
|
-
start_date_field = ['started_on', time_field_utc_suffix].join('_')
|
12
|
-
end_date_field = ['ended_on', time_field_utc_suffix].join('_')
|
9
|
+
start_time_field = ['started_at', time_field_utc_suffix].compact.join('_')
|
10
|
+
end_time_field = ['ended_at', time_field_utc_suffix].compact.join('_')
|
11
|
+
start_date_field = ['started_on', time_field_utc_suffix].compact.join('_')
|
12
|
+
end_date_field = ['ended_on', time_field_utc_suffix].compact.join('_')
|
13
13
|
|
14
14
|
define_method(start_time_field) do
|
15
15
|
return nil unless send(base_time_field).present? && send(options[:start]).present?
|