This is my first time using Ruby, and I've been given two dates. These two dates are always within 7 days of each other, and I need to get the difference between them.
My issue is, that one of these dates comes from a database, and is formatted like this
My other date is just
, but I can format it like the other using
I don't necessarily think I need to format the second date, but I was hoping if I got them both in the same format, I could just subtract them....which does not appear to be the case.
Any ideas how I could have this just return an integer for how many days are between the two dates, if one date is a pre-formatted date from a db?