Rails - How to counting down expired date on rails : I am creating Expired of voucher system. (expired:integer)

And the expired is counting down from the date it was made until the expired date.

E.g : i put 5 days into expired column as a validity period of this voucher.

October 1 = 5 days left

October 2 = 4 days left

October 3 = 3 days left

October 4 = 2 days left

October 5 = Last day

October 6 = Your voucher has expired
