Hello,
I am using the time.h library for getting date.
I need an algorithm or a method for checking if a product has expired but I am loosing it...
I have a product which has an expiration date. For example this date is stored in 3 integers
expDay = 20;
expMonth = 1;
expYear = 2015;
Now I am geting the same type date but the today date
todayDay = day();
todayMonth = month();
todayYear = year();
Also the perfect would be like
todayDate="13-11-2014";
expDate="20-01-2015";
if (todayDate>expDate)
Serial.println("product expired");
How can I implement the if condition ?