I need some help in doing a comparison of dates. The program works when the user enters the input date and it will compare it with a text document file on its date. If the dates is between the user enter date and it matches the document date then it will be executed.. Im thinking of using a switch case for this case instead of if.. is it possible?
if (date_compare(tld->begin, d) > 0 && //compare user input start date with actual date.txt begin input date
date_compare(tld->end, d) < 0) //compare user input end date with actual date.txt input date
return 0;