Sha256: 669aedd23edd69a022150f4c3c5da72e88e92d39d14e0a2263b1f4a206714a8f
Contents?: true
Size: 489 Bytes
Versions: 11
Compression:
Stored size: 489 Bytes
Contents
module Rubicure module Concerns # utility methods module Util # @param arg [Date,Time,String] # # @return [Date] arg is String or Date # @return [Time] arg is Time # @return [nil] arg is other def to_date(arg) case arg when Date, Time arg when String begin Date.parse(arg) rescue nil end else nil end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems