Methods
Public Instance methods
Parse data from string.
[ show source ]
# File lib/lore/facets/date.rb, line 390 def to_date #::Date::civil(*ParseDate.parsedate(self)[0..2]) ::Date.new(*::Date._parse(self, false).values_at(:year, :mon, :mday)) end
Convert string to DateTime.
[ show source ]
# File lib/lore/facets/date.rb, line 384 def to_datetime date = ::Date._parse(self, false).values_at(:year, :mon, :mday, :hour, :min, :sec).map { |arg| arg || 0 } ::DateTime.civil(*date) end