ArgumentError while parsing date string in Ruby
<p>I'm trying to determine the amount of days from the last .rpm that was installed using ruby, however when I try to format using the Date class, I'm getting that it's an invalid date (ArguementError) on line 5. I've tried methods of converting it to an integer as well but nothing seems to work. Any thoughts? </p>

<pre><code>require 'date'
require 'time'

tset = `rpm -qa --last | head -1 | rev | cut -d ' ' -f4-6 | rev`
atime = Date.strptime(tset, '%Y-%m-%d')
today = Date.today
btime = Date.strptime(today, '%Y-%m-%d')
daterange = ("btime - atime")
puts daterange
</code></pre>

<p>Here is the output of my rpm command</p>

<pre><code>[root@default-centos-67 dev]# rpm -qa --last | head -1 | rev | cut -d ' ' -f4-6 | rev

18 Nov 2016
</code></pre>