Sha256: 735d7684ae0f518b85c840c341bb4ac7f7e8ada69a767f24b1fbd179fa3ec06d
Contents?: true
Size: 452 Bytes
Versions: 8
Compression:
Stored size: 452 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
8 entries across 8 versions & 1 rubygems