Sha256: d888ef3f9bdbc488a152422935d168771155c047c80f561f369895e21d6e32fe
Contents?: true
Size: 458 Bytes
Versions: 13
Compression:
Stored size: 458 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.localtime if time.utc? time.strftime(TIME_COMPARABLE_FORMAT_SPECIFIER) end end end end
Version data entries
13 entries across 13 versions & 1 rubygems