This is probably an easy math question but what is the reason for the order of PEMDAS. I mean, why isnt' it SADMEP?
Parenthesis, Exponents, Multiplication, Division, Addition, Subtraction
Below was added because it does require knowledge of PEMDAS albeit a very basic concept it's one that I thought was more interesting in terms of why not how.
def time_left_for_reservation(terms_and_conditions_on)
time_lapsed = (Time.now - terms_and_conditions_on)
if (2.weeks.seconds - time_lapsed) > 1.day.seconds
"about #{pluralize(((2.weeks.seconds - time_lapsed) / (60 * 60 * 24)).ceil, 'day')}"
else
"about #{pluralize(((2.weeks.seconds - time_lapsed) / (60 * 60)).ceil, 'hour')}"
end
end