Sha256: 6db4ada18c41e3b65ec02ee9d434a866b20684ccf0f133b176fe2f3c84e937c2
Contents?: true
Size: 448 Bytes
Versions: 13
Compression:
Stored size: 448 Bytes
Contents
# frozen_string_literal: true module Dsu module Support module TimeComparable TIME_COMPARABLE_FORMAT_SPECIFIER = '%Y%m%d' 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
13 entries across 13 versions & 1 rubygems