% license_status = current_license.detail_with_local_file %> <% renewable_date = current_license.read_license("renewable_date") %> <% date_count = (renewable_date.to_date - Date.today).to_i %> <% day = pluralize( date_count, 'day' )%> <% if license_status == 0 text = 'Your license has expired.' elsif license_status == 2 if date_count == 0 text = "Your license will expire in tomorrow." else text = "Your license will expire in #{day}." end end %> <% if license_status == 0 || license_status == 2 %>