So whats the problem ?
- You have a CLICK-COUNTER!
- You expiration-date will always be the curret-date and time.
- How it would work for you?
You press a button → COUNTER → counts-up! (1,2,3,4,5,6,…)
You define/declare a max. → counterNumber = 10!
You generate an if-else-satement…
if() { ..... }
else { ..... }
You put some logic into it…
If my counter reaches → 10 ← set the expirationDate to → current DATE