Sha256: b9357cb410c7eb8bd8edc7847675a541963e868933521e36734e54b0efe1e059
Contents?: true
Size: 471 Bytes
Versions: 22
Compression:
Stored size: 471 Bytes
Contents
# frozen_string_literal: true module Dsu module Support module TimeComparable TIME_COMPARABLE_FORMAT_SPECIFIER = '%Y%m%d' module_function def time_equal?(other_time:) time_equal_compare_string_for(time: time) == time_equal_compare_string_for(time: other_time) end def time_equal_compare_string_for(time:) time = time.in_time_zone time.strftime(TIME_COMPARABLE_FORMAT_SPECIFIER) end end end end
Version data entries
22 entries across 22 versions & 1 rubygems