Sha256: e99325cc34000ca6796588aad817cab4af97341970bb99918fa9876d0a86490e
Contents?: true
Size: 451 Bytes
Versions: 82
Compression:
Stored size: 451 Bytes
Contents
require 'parsedate' module ActiveSupport #:nodoc: module CoreExtensions #:nodoc: module String #:nodoc: # Converting strings to other objects module Conversions # Form can be either :utc (default) or :local. def to_time(form = :utc) ::Time.send(form, *ParseDate.parsedate(self)) end def to_date ::Date.new(*ParseDate.parsedate(self)[0..2]) end end end end end
Version data entries
82 entries across 82 versions & 5 rubygems