Sha256: dc7ef253ae5c7be23497a509a08eaa195ebc5d976d5602f41bfca780ecad5c79
Contents?: true
Size: 313 Bytes
Versions: 43
Compression:
Stored size: 313 Bytes
Contents
require 'time' class Rack::App::Utils::Parser::Time def parse(str) ::Time.parse(str) end def validate(str) [ /(\d{4})-(\d{2})-(\d{2})T(\d{2})\:(\d{2})\:(\d{2})[+-](\d{2})\:(\d{2})/, /^\d+-\d\d-\d\d \d\d:\d\d:\d\d \+\d+$/ ].any? do |regexp| !!(str =~ regexp) end end end
Version data entries
43 entries across 43 versions & 1 rubygems