lib/timeliness.rb in timeliness-0.3.6 vs lib/timeliness.rb in timeliness-0.3.7
- old
+ new
@@ -22,32 +22,23 @@
#
# If ActiveSupport loaded, also
# - :current
# - 'Zone name'
#
- @default_timezone = :local
+ self.default_timezone = :local
# Set the default date part for a time type values.
- @date_for_time_type = lambda { Time.now }
+ #
+ self.date_for_time_type = lambda { Time.now }
- def self.date_for_time_type
- case @date_for_time_type
- when Array
- @date_for_time_type
- when Proc
- v = @date_for_time_type.call
- [v.year, v.month, v.day]
- end
- end
-
# Set the threshold value for a two digit year to be considered last century
#
# Default: 30
#
# Example:
# year = '29' is considered 2029
# year = '30' is considered 1930
#
- @ambiguous_year_threshold = 30
+ self.ambiguous_year_threshold = 30
end
Timeliness::Definitions.compile_formats