add expire at
This commit is contained in:
@@ -32,6 +32,14 @@ module TimeUtils
|
||||
tz_info.abbreviation(time)
|
||||
end
|
||||
|
||||
def parse_time_value(value)
|
||||
if value.is_a?(Integer)
|
||||
Time.zone.at(value.to_s.first(10).to_i)
|
||||
elsif value.present?
|
||||
Time.zone.parse(value)
|
||||
end
|
||||
end
|
||||
|
||||
def parse_date_string(string, pattern)
|
||||
pattern = pattern.sub(/Y+/, YEAR_FORMATS)
|
||||
.sub(/M+/, MONTH_FORMATS)
|
||||
|
||||
Reference in New Issue
Block a user