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